/* Saudizle Marketplace v1.2 - spacing & typography polish.
 * Intentional last-loaded visual layer over Sigma and saudizle.css.
 * Source of brand styles: owner-provided November 2026 index.html.
 * No external font downloads; preserves native OSClass behaviour.
 */
:root {
  --sz-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --sz-space-1: 6px;
  --sz-space-2: 12px;
  --sz-space-3: 18px;
  --sz-space-4: 24px;
  --sz-focus: 0 0 0 3px rgba(197,160,89,.28);
}
html, body, body input, body textarea, body select, body button,
body .form-container, body .form-container label, body .listing-card,
body .listing-card a, body .list-header, body #sidebar {
  font-family: var(--sz-font);
}
body { font-size: 15px; line-height: 1.55; }
body :is(h1,h2,h3,h4,h5,h6) { font-family: var(--sz-font); letter-spacing: -.022em; }
body a, body button { -webkit-tap-highlight-color: transparent; }
body :is(a,button,input,select,textarea):focus-visible { outline: 3px solid var(--sz-gold); outline-offset: 3px; }
body :is(input,select,textarea) { min-width: 0; }

/* Navigation: one visual rhythm, with no accidental Sigma overlap. */
header.sz-site-header { padding-block: 8px; }
.sz-site-header .sz-topbar { min-height: 62px; gap: 20px; }
.sz-site-header #logo, .sz-site-header #logo a { min-width: 0; }
.sz-site-header .sz-brand picture, .sz-site-header .sz-brand img { width: 54px; height: 54px; flex-basis: 54px; }
.sz-brand-copy strong { font-size: 20px; font-weight: 750; letter-spacing: -.025em; }
.sz-brand-copy small { font-size: 11px; letter-spacing: 0; }
.sz-site-header .nav { gap: 5px; }
.sz-site-header .nav a { min-height: 42px; padding: 10px 11px; font-size: 13px; font-weight: 650; }
.sz-site-header .nav a.publish.sz-post-btn { margin-left: 8px; padding-inline: 17px; font-weight: 750; }

/* A compact hero matching the original homepage proportions.
   Contain artwork to keep Saudi, the bilingual logo and category icons uncropped. */
.sz-hero { padding: 0; }
.sz-banner-frame { width: min(1100px, 100%); aspect-ratio: 16 / 5; overflow: hidden;
  background: linear-gradient(90deg,#00381B 0%,#005027 50%,#00381B 100%); }
.sz-banner-frame picture, .sz-banner-frame img { width: 100%; height: 100%; }
.sz-banner-frame img { object-fit: contain; object-position: center; }
.sz-hero-search { margin-top: -22px; }
.sz-search-form { grid-template-columns: minmax(200px, 245px) minmax(0,1fr); gap: 20px; padding: 18px 22px;
  align-items: center; border-radius: 12px; }
.sz-search-intro h1 { font-size: clamp(19px, 2.2vw, 23px); font-weight: 700; letter-spacing: -.022em; }
.sz-search-intro p { font-size: 13px; line-height: 1.5; }
.sz-search-field { font-size: 12px; font-weight: 700; }
.sz-search-inputs { gap: 10px; }
.sz-search-form .sz-search-field :is(input[type='search'],select) { height: 46px; font-size: 14px; }
.sz-search-form .sz-search-button { height: 46px; min-height: 46px; font-weight: 750; font-size: 14px; }

/* Clear visual spacing for home sections; avoid stacked oversized gaps. */
body.home section.sz-content-section { padding-top: 29px; }
.sz-journey-grid { gap: 15px; margin-bottom: 35px; align-items: stretch; }
.sz-journey-card { min-height: 160px; padding: 19px; border-radius: 12px; gap: 14px; }
.sz-journey-icon { flex: 0 0 44px; width: 44px; height: 44px; font-size: 23px; }
.sz-journey-content strong { font-size: 17px; font-weight: 700; line-height: 1.35; letter-spacing: -.02em; }
.sz-journey-content small { font-size: 13px; line-height: 1.5; }
.sz-journey-content em { padding-top: 13px; font-size: 12px; font-weight: 750; }
.sz-section-titlebar { gap: 16px; margin-bottom: 15px; }
.sz-section-titlebar h2 { font-size: clamp(21px, 2.5vw, 25px); font-weight: 700; margin: 4px 0 3px; }
.sz-section-titlebar p { font-size: 13px; }
.sz-view-all { font-weight: 700; font-size: 13px; }
.sz-category-grid { gap: 12px; margin-bottom: 36px; }
.sz-category-card { min-height: 120px; border-radius: 12px; padding: 15px 10px; gap: 9px; }
.sz-category-icon { width: 51px; height: 51px; font-size: 27px; border-radius: 13px; }
.sz-category-card strong { font-size: 13px; font-weight: 700; line-height: 1.35; }
.sz-category-arrow { opacity: .7; }
.sz-region-panel, .sz-safety-panel { border-radius: 12px; }
.sz-region-panel { padding: 23px; }
.sz-region-grid a { min-height: 46px; font-size: 13px; font-weight: 650; }
.sz-safety-panel { padding: 25px; }
.sz-safety-panel h2 { font-size: 24px; font-weight: 700; }
.sz-safety-panel p, .sz-safety-panel a { font-size: 13px; }
.sz-resource-grid { gap: 13px; }
.sz-resource-card { min-height: 155px; border-radius: 12px; padding: 19px; gap: 6px; }
.sz-resource-card > strong { font-size: 14px; font-weight: 700; line-height: 1.35; }
.sz-resource-card p { font-size: 13px; line-height: 1.5; }
.sz-resource-link { transition: transform .18s, border-color .18s, box-shadow .18s; }
.sz-resource-link:hover { transform: translateY(-2px); }

/* Listing cards have equal-height copy, aligned prices and predictable photo crops. */
.home-latest .listing-card-list.listing-grid, body.search .listing-card-list.listing-grid, .similar_ads .listing-card-list.listing-grid { align-items: stretch; }
.listing-card-list.listing-grid .listing-card { display: flex; flex-direction: column; min-height: 0; border-radius: 12px; }
.listing-card-list.listing-grid .listing-card .listing-thumb { flex: none; display: block; width: 100%; aspect-ratio: 4 / 3; height: auto; overflow: hidden; }
.listing-card-list.listing-grid .listing-card .listing-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.listing-card-list.listing-grid .listing-card .listing-detail { display: flex; flex: 1; min-height: 0; padding: 14px 15px 16px; }
.listing-card-list.listing-grid .listing-card :is(.listing-cell,.listing-data,.listing-basicinfo) { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.listing-card-list.listing-grid .listing-card .listing-attributes { margin-top: auto; }
.listing-card-list.listing-grid .listing-card .listing-basicinfo a.title { font-size: 14px; font-weight: 700; line-height: 1.45; min-height: 41px; margin: 0 0 11px; }
.listing-card-list.listing-grid .listing-card .currency-value { display: block; font-size: 17px; line-height: 1.3; font-weight: 800; margin: 0 0 8px; }
.listing-card-list.listing-grid .listing-card .listing-details { font-size: 12px; line-height: 1.5; gap: 3px 9px; }
.listing-card-list.listing-grid .listing-card .listing-details :is(.location,.category) { font-size: inherit; line-height: inherit; }
.listing-list .listing-card { border-radius: 12px; padding: 14px; gap: 16px; }
.listing-list .listing-card .listing-thumb { border-radius: 9px; }
.listing-list .listing-card .listing-basicinfo a.title { font-size: 16px; font-weight: 700; }
.listing-list .listing-card .desc { line-height: 1.55; }
.sz-empty-listings { border-radius: 12px; }

/* Search: make filters and results read like part of the same design. */
body.search .list-header { border-radius: 12px; padding: 19px 21px; margin-bottom: 17px; }
body.search .list-header h1 { font-size: clamp(21px,2.5vw,25px); line-height: 1.3; font-weight: 700; }
body.search .list-header .actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
body.search .list-header .actions > * { margin-bottom: 0; }
body.search .list-header .counter-search { font-size: 13px; }
body.search #sidebar { border-radius: 12px; padding: 19px; }
body.search #sidebar .filters h3, body.search #sidebar .refine h3 { color: var(--sz-deep); font-size: 14px; font-weight: 700; }
body.search #sidebar :is(input[type='text'],input[type='number'],select) { min-height: 43px; font-size: 14px; }
body.search #sidebar .btn-primary { background: var(--sz-gold); border-color: var(--sz-gold); color: #173321; font-weight: 750; min-height: 43px; }
body.search #sidebar .btn-primary:hover { background: var(--sz-gold-hover); }
body.search .paginate { margin-top: 26px; }
body.search .paginate :is(a,span) { border-radius: 7px; }

/* Detail pages: consistent reading width and photo/seller hierarchy. */
body.item #item-content { padding: clamp(18px,2.5vw,29px); border-radius: 12px; }
body.item #item-content h1 { font-size: clamp(22px,2.5vw,28px); font-weight: 700; margin-bottom: 15px; }
body.item #item-content .item-header { font-size: 13px; line-height: 1.6; }
body.item .item-photos { gap: 12px; margin-top: 14px; }
body.item .item-photos .main-photo { border-radius: 11px; background: #F4F8F5; }
body.item .item-photos .main-photo img { object-fit: contain; }
body.item .item-photos .thumbs img { border-radius: 7px; }
body.item #description .desc { font-size: 15px; line-height: 1.75; overflow-wrap: anywhere; }
body.item #sidebar .price { border-radius: 10px; font-size: 25px; }
body.item #sidebar .widget-box { border-radius: 12px; }
body.item #sidebar .widget-box h2 { font-weight: 700; }
body.item #comments h2, body.item .similar_ads h2 { font-size: 21px; font-weight: 700; }

/* Forms, authentication and account dashboard: original Saudizle spacing. */
.form-container-box { display: flow-root; max-width: 570px; border-radius: 12px; margin: 25px auto 42px; padding: clamp(22px,3.5vw,34px); }
.form-container-box .header h1 { font-size: clamp(22px,3vw,27px); font-weight: 700; margin-bottom: 23px; }
.form-container-box .control-group { margin-bottom: 18px; }
.form-container-box .control-group > label { font-size: 14px; line-height: 1.4; font-weight: 650; margin-bottom: 7px; }
.form-container-box .controls { width: 100%; }
.form-container-box :is(input[type='email'],input[type='password'],input[type='text'],select) { min-height: 46px; width: 100%; margin: 0; }
.form-container-box .control-group.remember { margin-bottom: 19px; }
.form-container-box .control-group.remember :is(label,input) { vertical-align: middle; }
.form-container-box .control-group.butt .btn { width: 100%; min-height: 46px; font-size: 14px; }
.form-container-box .control-group.act { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; }
.form-container-box .control-group.act a { float: none !important; color: var(--sz-green); font-size: 13px; }
.form-container :is(input[type='text'],input[type='password'],input[type='email'],input[type='tel'],input[type='number'],select,textarea) { font-family: var(--sz-font); font-size: 14px; line-height: 1.5; }
.form-container :is(input[type='text'],input[type='password'],input[type='email'],input[type='tel'],input[type='number'],select) { min-height: 46px; }
.form-container .control-group > label { font-weight: 650; color: #244634; font-size: 13px; }
.form-container :is(input,select,textarea):focus { box-shadow: var(--sz-focus); outline: none; border-color: #72A486; }
.form-container .btn-primary, .form-container button[type='submit'], .form-container input[type='submit'] { min-height: 45px; padding-inline: 18px; font-weight: 750; font-size: 14px; }
body.item-post #main > .form-container { display: flow-root; border-radius: 12px; }
body.item-post .form-container h1 { font-size: 26px; font-weight: 700; }
body.item-post .form-container h2 { font-size: 19px; font-weight: 700; margin-top: 12px; }
body.item-post .form-container .control-group { margin-bottom: 19px; }
body.item-post .form-container :is(input[type='text'],input[type='email'],textarea) { border-radius: 9px; }
body.item-post .form-container .control-group.title input, body.item-post .form-container .control-group.descr textarea { margin-bottom: 0; }
body.item-post .form-container .box.location, body.item-post .form-container .box.seller_info { margin-top: 25px; padding-top: 21px; }
body.item-post .form-container .controls :is(.help-block,.help-inline) { font-size: 12px; color: var(--sz-muted); }
body.user #main { display: flow-root; border-radius: 12px; padding: clamp(16px,2.5vw,26px); }
body.user #main h1 { font-size: clamp(22px,3vw,27px); font-weight: 700; }
body.user #sidebar { border-radius: 12px; }
body.user .form-horizontal .control-group { margin-bottom: 17px; }
body.user .form-horizontal .controls input[type='text'], body.user .form-horizontal .controls input[type='password'], body.user .form-horizontal .controls input[type='email'], body.user .form-horizontal .controls select { max-width: 100%; }
body.user .form-horizontal .controls textarea { max-width: 100%; }

/* Footer retains all original social links but improves optical alignment. */
footer.sz-footer { padding-top: 34px; }
.sz-footer-upper { gap: 26px; }
.sz-footer-brand img { width: 56px; height: 56px; }
.sz-footer-brand strong { font-size: 19px; font-weight: 700; }
.sz-footer-links > strong, .sz-footer-follow > strong { font-size: 14px; font-weight: 700; }
.sz-footer-links a, .sz-footer-follow > p, .sz-footer-about > p { font-size: 13px; }
.sz-footer-social a { font-size: 12px; min-height: 36px; }

/* Tablets and phones: avoid cramped navigation, card overflow and tiny targets. */
@media (max-width: 1100px) {
  .sz-site-header .nav a { font-size: 12px; padding-inline: 8px; }
  .sz-site-header .nav a.publish.sz-post-btn { padding-inline: 12px; }
}
@media (max-width: 960px) {
  .sz-site-header .sz-topbar { min-height: 57px; }
  .sz-site-header .nav { gap: 4px; }
  .sz-site-header .nav a { font-size: 14px; padding: 12px 13px; min-height: 45px; }
  .sz-site-header .sz-brand picture, .sz-site-header .sz-brand img { width: 50px; height: 50px; flex-basis: 50px; }
  .sz-search-form { grid-template-columns: 1fr; gap: 12px; }
  .sz-search-intro h1 { font-size: 21px; }
  .sz-journey-card { min-height: 184px; }
  .sz-category-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 767px) {
  .sz-search-form { padding: 16px; }
  .sz-category-grid { gap: 10px; }
  .sz-journey-grid { gap: 10px; }
  .sz-journey-card { padding: 14px; }
  .sz-journey-content small { font-size: 12px; }
  body.search .list-header { padding: 16px; }
  body.search .list-header .actions { gap: 8px; }
  .listing-card-list.listing-grid .listing-card .listing-detail { padding: 12px 12px 14px; }
  .listing-card-list.listing-grid .listing-card .listing-basicinfo a.title { font-size: 13px; }
  .listing-card-list.listing-grid .listing-card .currency-value { font-size: 15px; }
  body.item #sidebar .widget-box { padding: 17px; }
  body.item #item-content { padding: 18px; }
  .form-horizontal .controls { min-width: 0; }
}
@media (max-width: 600px) {
  .sz-site-header .sz-brand picture, .sz-site-header .sz-brand img { width: 44px; height: 44px; flex-basis: 44px; }
  .sz-brand-copy strong { font-size: 17px; }
  .sz-brand-copy small { font-size: 10px; }
  .sz-banner-frame { aspect-ratio: 1849 / 689; }
  .sz-hero-search { margin-top: -12px; }
  .sz-search-form { padding: 16px; border-radius: 12px; }
  .sz-search-intro h1 { font-size: 19px; }
  .sz-search-inputs { grid-template-columns: 1fr 1fr; gap: 9px; }
  .sz-search-field:first-child { grid-column: 1 / -1; }
  .sz-search-form .sz-search-field :is(input[type='search'],select), .sz-search-form .sz-search-button { height: 44px; min-height: 44px; }
  body.home section.sz-content-section { padding-top: 25px; }
  .sz-journey-grid { grid-template-columns: 1fr; }
  .sz-journey-card { min-height: 0; flex-direction: row; padding: 14px; }
  .sz-journey-content strong { font-size: 16px; }
  .sz-journey-content small { font-size: 12px; }
  .sz-section-titlebar { gap: 9px; }
  .sz-section-titlebar h2 { font-size: 21px; }
  .sz-section-titlebar p { font-size: 12px; }
  .sz-category-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .sz-category-card { min-height: 112px; padding: 12px 8px; }
  .sz-category-icon { width: 45px; height: 45px; font-size: 24px; }
  .sz-category-card strong { font-size: 12px; }
  .sz-region-panel, .sz-safety-panel { padding: 18px; }
  .sz-resource-grid { grid-template-columns: 1fr; }
  .sz-resource-card { min-height: 0; padding: 16px; }
  .sz-footer-upper { gap: 20px; }
  body.item-post .form-container .control-group > label, body.user .form-horizontal .control-group > label { float: none; display: block; width: 100%; text-align: start; padding: 0; margin-bottom: 6px; }
  body.item-post .form-container .control-group > .controls, body.user .form-horizontal .control-group > .controls { float: none; width: 100%; margin: 0; }
  body.item-post .form-container :is(h1,h2,.pblbt), .form-horizontal .controls.recpt { padding-left: 0; }
  body.item-post .form-horizontal .actions, body.item-post .form-horizontal .control-group.img, body.item-post .form-horizontal .controls.checkbox, body.user .form-horizontal .control-group.bts { padding-left: 0; margin-left: 0; }
  body.user .form-horizontal .controls :is(input[type='text'],input[type='password'],input[type='email'],select,textarea) { width: 100%; max-width: 100%; }
}
@media (max-width: 380px) {
  .sz-search-inputs { grid-template-columns: 1fr; }
  .sz-search-field:first-child { grid-column: auto; }
  .sz-section-titlebar { flex-wrap: wrap; }
  .sz-view-all { margin-top: 1px; }
  .home-latest .listing-card-list.listing-grid, body.search .listing-card-list.listing-grid, .similar_ads .listing-card-list.listing-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .sz-resource-link, .sz-category-card, .sz-journey-card { transition: none; }
}
