/* public/styles/sahibinden-native-mobile.css — Authentic Sahibinden Mobile UI */
@media (max-width: 768px), screen and (max-device-width: 768px) {
  :root {
    --sb-blue: #103864;
    --sb-blue-dark: #0a2544;
    --sb-yellow: #FFDB00;
    --sb-yellow-dark: #e6c500;
    --sb-bg: #FFFFFF;
    --sb-surface: #F8FAFC;
    --sb-border: #E2E8F0;
    --sb-text: #0F172A;
    --sb-muted: #64748B;
    --sb-price: #0056B3;
    --sb-green: #10B981;
    --sb-amber: #F59E0B;
    --sb-red: #EF4444;
  }

  body {
    background-color: var(--sb-surface) !important;
    padding-bottom: 74px !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  }

  /* -------------------------------------------------------------
     1. SAHIBINDEN TOP HEADER
     ------------------------------------------------------------- */
  #sb-mobile-top-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    height: 52px;
    background: var(--sb-blue);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    z-index: 10000;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  }

  .sb-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .sb-brand-square {
    width: 32px;
    height: 32px;
    background: var(--sb-yellow);
    color: #000000;
    font-weight: 900;
    font-size: 19px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    text-decoration: none;
  }

  .sb-header-title {
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.2px;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
  }

  .sb-header-subtitle {
    font-size: 10.5px;
    color: #cbd5e1;
    font-weight: 400;
  }

  .sb-header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
  }

  .sb-header-icon-btn {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 19px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 4px;
  }

  .sb-header-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--sb-red);
    color: #fff;
    font-size: 9.5px;
    font-weight: 800;
    min-width: 15px;
    height: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
  }

  /* -------------------------------------------------------------
     2. SEARCH TAB & SEARCH INPUT PILL
     ------------------------------------------------------------- */
  .sb-search-pill-wrap {
    padding: 10px 14px;
    background: var(--sb-blue);
    margin-bottom: 6px;
  }

  .sb-search-pill {
    background: #ffffff;
    border-radius: 22px;
    height: 40px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    gap: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  }

  .sb-search-pill input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 13.5px;
    background: transparent;
    color: var(--sb-text);
  }

  .sb-search-pill input::placeholder {
    color: #94a3b8;
  }

  .sb-search-pill-icon {
    color: #64748b;
    font-size: 15px;
  }

  /* -------------------------------------------------------------
     3. SAHIBINDEN CATEGORY TREE (COLORED CIRCLES)
     ------------------------------------------------------------- */
  .sb-cat-tree-card {
    background: #ffffff;
    border-radius: 0;
    border-top: 1px solid var(--sb-border);
    border-bottom: 1px solid var(--sb-border);
    margin-bottom: 10px;
  }

  .sb-cat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
  }

  .sb-cat-row:last-child {
    border-bottom: none;
  }

  .sb-cat-row:active {
    background: #f8fafc;
  }

  .sb-cat-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
  }

  .sb-cat-circle-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 18px;
    flex-shrink: 0;
  }

  .sb-cat-texts {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  .sb-cat-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--sb-text);
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .sb-cat-desc {
    font-size: 11px;
    color: var(--sb-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
  }

  .sb-cat-arrow {
    color: #cbd5e1;
    font-size: 17px;
    font-weight: 700;
    margin-inline-start: 8px;
  }

  /* Quick Filters Rows (Fire Sale / 48 Hours) */
  .sb-quick-filter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 14px;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    color: var(--sb-text);
  }

  .sb-quick-filter-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 14px;
    color: #475569;
  }

  /* -------------------------------------------------------------
     4. FEED SECTIONS (LISTINGS FOR YOU, NEAR YOU, RECENT)
     ------------------------------------------------------------- */
  .sb-section-wrap {
    background: #ffffff;
    margin-bottom: 12px;
    border-top: 1px solid var(--sb-border);
    border-bottom: 1px solid var(--sb-border);
  }

  .sb-section-header {
    padding: 11px 14px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #64748b;
    text-transform: uppercase;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
  }

  .sb-listing-item-row {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    color: inherit;
    gap: 12px;
    background: #ffffff;
  }

  .sb-listing-item-row:last-child {
    border-bottom: none;
  }

  .sb-listing-item-thumb {
    width: 76px;
    height: 76px;
    border-radius: 4px;
    object-fit: cover;
    background: #f1f5f9;
    flex-shrink: 0;
  }

  .sb-listing-item-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .sb-listing-item-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--sb-text);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .sb-listing-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    font-size: 11px;
    color: #64748b;
  }

  .sb-match-badge {
    color: #059669;
    font-weight: 700;
    font-size: 11px;
  }

  .sb-listing-item-price {
    font-size: 13.5px;
    font-weight: 800;
    color: var(--sb-price);
    margin-top: 3px;
    text-align: right;
  }

  .sb-section-show-all {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    color: var(--sb-price);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    border-top: 1px solid #f1f5f9;
    background: #ffffff;
  }

  /* -------------------------------------------------------------
     5. SHOWCASE (VITRIN) 2-COLUMN GRID
     ------------------------------------------------------------- */
  .sb-showcase-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 8px;
  }

  .sb-showcase-card {
    background: #ffffff;
    border-radius: 6px;
    border: 1px solid var(--sb-border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  }

  .sb-showcase-img-box {
    position: relative;
    width: 100%;
    padding-top: 75%;
    background: #f1f5f9;
  }

  .sb-showcase-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .sb-showcase-body {
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
  }

  .sb-showcase-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--sb-text);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .sb-showcase-price {
    font-size: 13px;
    font-weight: 800;
    color: var(--sb-price);
    margin-top: 6px;
  }

  /* -------------------------------------------------------------
     6. SERVICES 360 (AUTO360 & REALESTATE360)
     ------------------------------------------------------------- */
  .sb-service-card {
    background: #ffffff;
    border-radius: 8px;
    margin: 12px 10px;
    border: 1px solid var(--sb-border);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  }

  .sb-service-hd {
    padding: 14px;
    display: flex;
    gap: 12px;
    border-bottom: 1px solid #f1f5f9;
  }

  .sb-service-hd-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--sb-yellow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #000;
    flex-shrink: 0;
  }

  .sb-service-hd-texts h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: var(--sb-text);
  }

  .sb-service-hd-texts p {
    margin: 4px 0 0 0;
    font-size: 11.5px;
    color: var(--sb-muted);
    line-height: 1.4;
  }

  .sb-service-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 14px;
    border-bottom: 1px solid #f8fafc;
    text-decoration: none;
    color: var(--sb-text);
    font-size: 13.5px;
    font-weight: 600;
  }

  .sb-service-row:last-child {
    border-bottom: none;
  }

  .sb-service-row-left {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  /* -------------------------------------------------------------
     7. MY ACCOUNT HUB & SECURITY
     ------------------------------------------------------------- */
  .sb-account-group-title {
    padding: 12px 14px 6px;
    font-size: 11.5px;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
  }

  .sb-account-card {
    background: #ffffff;
    border-top: 1px solid var(--sb-border);
    border-bottom: 1px solid var(--sb-border);
    margin-bottom: 10px;
  }

  .sb-account-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 14px;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    color: var(--sb-text);
    font-size: 13.5px;
    font-weight: 600;
  }

  .sb-account-row:last-child {
    border-bottom: none;
  }

  .sb-account-row-left {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .sb-account-row-icon {
    font-size: 18px;
    width: 22px;
    text-align: center;
    color: #475569;
  }

  /* Security Cards (Part 3) */
  .sb-security-card {
    background: #ffffff;
    border-radius: 6px;
    margin: 10px 12px;
    padding: 16px;
    border: 1px solid var(--sb-border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  }

  .sb-security-title {
    font-size: 14.5px;
    font-weight: 800;
    color: var(--sb-text);
  }

  .sb-security-desc {
    font-size: 12px;
    color: #64748b;
    margin: 6px 0 10px 0;
    line-height: 1.5;
  }

  .sb-pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
  }

  .sb-pill-green {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
  }

  .sb-pill-amber {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
  }

  .sb-pill-grey {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
  }

  .sb-security-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 8px;
  }

  .sb-security-btn {
    color: var(--sb-price);
    font-weight: 700;
    font-size: 13px;
    background: transparent;
    border: none;
    cursor: pointer;
  }

  /* -------------------------------------------------------------
     8. MESSAGES INBOX WITH PILLS
     ------------------------------------------------------------- */
  .sb-filter-pills-bar {
    display: flex;
    gap: 8px;
    padding: 10px 14px;
    background: #ffffff;
    border-bottom: 1px solid var(--sb-border);
    overflow-x: auto;
  }

  .sb-filter-pill-btn {
    border-radius: 16px;
    padding: 6px 14px;
    font-size: 12.5px;
    font-weight: 700;
    border: 1px solid var(--sb-border);
    background: #ffffff;
    color: #475569;
    cursor: pointer;
    white-space: nowrap;
  }

  .sb-filter-pill-btn.active {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1d4ed8;
  }

  /* -------------------------------------------------------------
     9. LISTING DETAIL & INTERACTIVE GEO MAP BOX
     ------------------------------------------------------------- */
  .sb-detail-geo-map-box {
    margin: 14px 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1.5px solid var(--sb-border);
    background: #ffffff;
  }

  .sb-detail-geo-map-hd {
    padding: 10px 14px;
    background: #f8fafc;
    border-bottom: 1px solid var(--sb-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 800;
    color: var(--sb-text);
  }

  .sb-detail-geo-map-canvas {
    width: 100%;
    height: 220px;
    background: #e2e8f0;
  }

  /* -------------------------------------------------------------
     10. SAHIBINDEN 5-TAB BOTTOM BAR (ELEVATED CENTER +)
     ------------------------------------------------------------- */
  #sb-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 58px;
    background: #ffffff;
    border-top: 1px solid var(--sb-border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 10000;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
  }

  .sb-bottom-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-decoration: none;
    color: #64748b;
    font-size: 10px;
    font-weight: 600;
    transition: color 0.15s;
    height: 100%;
  }

  .sb-bottom-tab.active {
    color: var(--sb-blue);
    font-weight: 800;
  }

  .sb-bottom-tab-icon {
    font-size: 19px;
  }

  /* Center Elevated + Post Listing Button */
  .sb-center-post-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    position: relative;
    top: -10px;
  }

  .sb-center-post-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--sb-blue);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 300;
    box-shadow: 0 4px 10px rgba(16, 56, 100, 0.35);
    border: 3px solid #ffffff;
  }

  .sb-center-post-label {
    font-size: 9.5px;
    color: #64748b;
    font-weight: 700;
    margin-top: 3px;
  }

  /* Floating sahi AI Bubble */
  #sb-floating-ai-bubble {
    position: fixed;
    bottom: 68px;
    right: 14px;
    background: #000000;
    color: #ffffff;
    border-radius: 20px;
    padding: 7px 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    z-index: 9999;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.15);
  }

  .sb-ai-yellow-badge {
    background: var(--sb-yellow);
    color: #000;
    font-weight: 900;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 10px;
  }
}
