/* Sharwat home marketplace layout */

body.home-body {
  align-items: flex-start;
  justify-content: flex-start;
  padding: 0;
  background: var(--bg-body);
  --home-banner-width: 1010px;
}

.site-shell {
  width: 100%;
  max-width: 1420px;
  margin: 0 auto;
  padding: 16px 20px 48px;
}

.layout-stable {
  direction: ltr;
}

.layout-stable .profile-dropdown {
  inset-inline-end: unset;
  left: 0;
  right: auto;
}

.layout-stable .icon-btn .badge-dot {
  inset-inline-end: unset;
  left: 8px;
  right: auto;
}

.layout-stable .section-head {
  justify-content: flex-end;
}

.layout-stable .section-title {
  flex-direction: row-reverse;
}

html[lang="ar"] .layout-stable .section-title span {
  direction: rtl;
  unicode-bidi: plaintext;
}

.layout-stable .categories-grid,
.layout-stable .vip-grid {
  direction: rtl;
}

.layout-stable .search-box {
  direction: rtl;
}

.layout-stable .search-box input {
  text-align: right;
}

/* ── Header ── */
.site-header {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

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

.header-brand {
  flex-shrink: 0;
  margin-left: auto;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  min-height: 44px;
}

.logo-link img {
  width: 100px;
  height: 50px;
  max-width: 100px;
  max-height: 50px;
  object-fit: contain;
}

.logo-link.logo-fallback {
  font-size: 22px;
  font-weight: 800;
  color: var(--burgundy-deep);
  letter-spacing: 0.5px;
}


.icon-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border-light);
  border-radius: 50%;
  background: var(--bg-white);
  color: var(--burgundy-deep);
  cursor: pointer;
  font-size: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.icon-btn:hover {
  background: var(--burgundy-pale);
  border-color: var(--burgundy-light);
}

.icon-btn .badge-dot {
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--error);
  border: 2px solid var(--bg-white);
}

.icon-btn .badge-dot.badge-count,
.mbn-badge.badge-count {
  width: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.profile-wrap {
  position: relative;
}

.profile-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  background: var(--bg-white);
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
}

.profile-btn:hover {
  background: var(--burgundy-pale);
}

.profile-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--burgundy-mid), var(--burgundy-deep));
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-chevron {
  color: var(--text-muted);
  font-size: 12px;
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  min-width: 240px;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 8px 0;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.profile-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.profile-dropdown__head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
}

.profile-dropdown__name {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 15px;
}

.profile-dropdown__meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.profile-dropdown__balance {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--burgundy-pale);
  color: var(--burgundy);
  font-size: 12px;
  font-weight: 800;
}

.profile-dropdown__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: inherit;
  text-decoration: none;
  transition: background 0.15s;
}

.profile-dropdown__item:hover {
  background: var(--burgundy-pale);
  color: var(--burgundy-deep);
}

.profile-dropdown__item i {
  width: 18px;
  color: var(--burgundy-mid);
}

.profile-dropdown__divider {
  height: 1px;
  background: var(--border-light);
  margin: 6px 0;
}

.notifications-wrap {
  position: relative;
}

.notifications-panel {
  position: fixed;
  z-index: 900;
  width: min(360px, calc(100vw - 24px));
  max-height: min(420px, calc(100vh - 24px));
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.notifications-panel[hidden] {
  display: none !important;
}

.notifications-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  direction: rtl;
  flex-shrink: 0;
  background: #fff;
}

.notifications-panel__head .link-btn {
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
}

.notifications-panel__list {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.notif-item {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
}

.notif-item:hover { background: var(--burgundy-pale); }
.notif-item--link { cursor: pointer; }
.notif-item.unread { background: #fdf8fa; }
.notif-item__title { font-weight: 800; font-size: 14px; margin-bottom: 4px; }
.notif-item__body { font-size: 13px; color: var(--text-muted); line-height: 1.5; white-space: pre-wrap; }
.notif-item__time { font-size: 11px; color: var(--text-muted); margin-top: 6px; }
.notif-empty { padding: 24px; text-align: center; color: var(--text-muted); font-size: 14px; }

.notifications-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 800;
  display: none;
}

.notifications-backdrop.show { display: block; }

/* ── Search + Add ad (aligned with banner width) ── */
.search-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
  flex-wrap: nowrap;
  width: 100%;
  max-width: var(--home-banner-width);
  margin-inline: auto;
}

.search-box {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  display: flex;
  align-items: stretch;
  background: var(--bg-white);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 15px;
  background: transparent;
  color: var(--text-primary);
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.btn-search {
  border: none;
  background: var(--burgundy-pale);
  color: var(--burgundy-deep);
  padding: 0 20px;
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-search:hover {
  background: var(--burgundy-light);
  color: #fff;
}

.btn-add-ad {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--burgundy-mid), var(--burgundy-deep));
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.btn-add-ad:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

/* ── Banner 1010×250 ── */
.banner-section {
  margin-bottom: 28px;
}

.banner-section--empty {
  display: none;
}

.banner-loading {
  width: 100%;
  aspect-ratio: 1010 / 250;
  background: linear-gradient(90deg, var(--burgundy-pale) 25%, #fff 50%, var(--burgundy-pale) 75%);
  background-size: 200% 100%;
  animation: banner-shimmer 1.2s ease-in-out infinite;
}

@keyframes banner-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.banner-slider {
  width: 100%;
  max-width: var(--home-banner-width);
  margin: 0 auto;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: var(--burgundy-pale);
}

.banner-viewport {
  width: 100%;
  aspect-ratio: 1010 / 250;
  overflow: hidden;
  position: relative;
}

.banner-viewport--single .banner-slide {
  width: 100%;
  height: 100%;
}

.banner-track {
  display: flex;
  height: 100%;
  will-change: transform;
}

.banner-slide {
  flex: 0 0 100%;
  height: 100%;
  display: block;
  text-decoration: none;
}

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

/* ── Categories 150×150 ── */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

.section-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title i {
  color: var(--burgundy-mid);
}

.categories-section {
  margin-bottom: 32px;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 20px 16px;
  justify-items: center;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  width: 150px;
  transition: transform 0.2s ease;
}

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

.category-card__img-wrap {
  width: 150px;
  height: 150px;
  border-radius: var(--radius-sm);
  background: var(--bg-white);
  border: 1px solid rgba(168, 77, 114, 0.12);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.category-card__icon-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

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

.category-card__icon-img.is-hidden {
  display: none;
}

.category-card__emoji.is-hidden {
  display: none;
}

.category-card__icon-wrap.is-emoji-fallback .category-card__emoji,
.category-card__icon-wrap .category-card__emoji:not(.is-hidden) {
  display: block;
}

.category-page-icon-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.category-page-icon-inner .category-card__icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.category-page-icon-inner .category-card__emoji {
  font-size: 48px;
  line-height: 1;
}

.category-card:hover .category-card__img-wrap {
  border-color: var(--burgundy-light);
  box-shadow: var(--shadow-card);
}

.category-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.category-card__emoji {
  font-size: 56px;
  line-height: 1;
}

.category-card__name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.4;
}

/* ── Featured ads (VIP + Premium) ── */
.featured-section,
.vip-section {
  margin-bottom: 24px;
}

.home-auctions-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.home-load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.home-load-more-btn {
  min-width: 200px;
  padding: 12px 28px;
  border-radius: 999px;
  border: 1.5px solid var(--burgundy-mid, #8b3a5a);
  background: #fff;
  color: var(--burgundy-deep, #6b2a45);
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.home-load-more-btn:hover:not(:disabled) {
  background: var(--burgundy-pale, #f7eef2);
}

.home-load-more-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

/* Home auction row cards */
.auction-row-card {
  display: flex;
  gap: 12px;
  align-items: stretch;
  text-decoration: none;
  color: inherit;
  background: var(--bg-white, #fff);
  border: 1px solid rgba(168, 77, 114, 0.14);
  border-radius: 14px;
  padding: 10px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.auction-row-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-card);
  color: inherit;
}

.auction-row-card__media {
  position: relative;
  width: 112px;
  min-width: 112px;
  height: 112px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-soft, #f6f4f5);
}

.auction-row-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auction-row-card__thumb-ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--burgundy-light, #c48aa5);
  font-size: 28px;
}

.auction-row-card__media-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.25), transparent 55%);
  pointer-events: none;
}

.auction-row-card__badge {
  position: absolute;
  top: 8px;
  inset-inline-start: 8px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
}

.auction-row-card__badge--live { background: #16a34a; }
.auction-row-card__badge--ended { background: #6b7280; }
.auction-row-card__live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
}

.auction-row-card__photos {
  position: absolute;
  bottom: 8px;
  inset-inline-end: 8px;
  z-index: 1;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.auction-row-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.auction-row-card__title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.auction-row-card__location {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.auction-row-card__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.auction-row-card__chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--burgundy-pale, #f7eef2);
  color: var(--burgundy-deep, #6b2a45);
}

.auction-row-card__bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.auction-row-card__price-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
}

.auction-row-card__price {
  font-size: 16px;
  font-weight: 900;
  color: var(--burgundy-deep, #6b2a45);
}

.auction-row-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--burgundy-mid, #8b3a5a);
}

.vip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.vip-card {
  background: var(--bg-white);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(168, 77, 114, 0.12);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

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

.vip-card__img-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--bg-soft);
  overflow: hidden;
}

.vip-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vip-card__badge {
  position: absolute;
  top: 10px;
  inset-inline-start: 10px;
  background: linear-gradient(135deg, #c9a227, #8b6914);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.vip-card__body {
  padding: 14px;
}

.vip-card__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.vip-card__price {
  font-size: 17px;
  font-weight: 800;
  color: var(--burgundy-deep);
  margin-bottom: 6px;
}

.vip-card__location {
  font-size: 13px;
  color: var(--text-muted);
}

.vip-card__location i {
  color: var(--burgundy-mid);
  margin-inline-end: 4px;
}

/* ── Category page placeholder ── */
.category-page-shell {
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  padding: 20px;
}

.category-page-shell .categories-grid {
  width: 100%;
}

.category-page-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.category-page-icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-page-icon img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.category-page-emoji {
  font-size: 48px;
  line-height: 1;
}

.category-placeholder.hidden {
  display: none;
}

.category-page-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
}

.category-placeholder {
  background: var(--burgundy-bg-card);
  border: 1px dashed var(--burgundy-light);
  border-radius: var(--radius-sm);
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
  line-height: 1.8;
}

.btn-back-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--burgundy-mid);
  font-weight: 700;
  text-decoration: none;
  font-size: 14px;
}

.btn-back-home:hover {
  color: var(--burgundy-deep);
}

/* App-style outer search button — hidden on desktop */
.btn-search-outer {
  display: none;
}

/* ── Mobile bottom navigation bar ── */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 767px) {
  /* Bottom nav — mobile app mode only */
  html.mobile-app-mode .mobile-bottom-nav {
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-white);
    border-top: 1px solid var(--border-light);
    box-shadow: 0 -4px 24px rgba(100, 20, 50, 0.10);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    height: calc(60px + env(safe-area-inset-bottom, 0px));
  }

  .mbn-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 10px;
    font-weight: 700;
    padding: 6px 4px 4px;
    position: relative;
    transition: color 0.18s;
    -webkit-tap-highlight-color: transparent;
  }

  .mbn-btn:active,
  .mbn-btn.active {
    color: var(--burgundy-deep);
  }

  .mbn-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
  }

  .mbn-btn i {
    font-size: 20px;
  }

  .mbn-label {
    font-size: 10px;
    line-height: 1;
  }

  .mbn-badge {
    position: absolute;
    top: -2px;
    right: -4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--error);
    border: 2px solid var(--bg-white);
  }

  .mbn-badge.badge-count {
    width: auto;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    font-size: 10px;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
  }

  .mbn-badge.hidden {
    display: none;
  }

  .notifications-panel:not([hidden]) {
    top: auto !important;
    bottom: calc(60px + env(safe-area-inset-bottom, 0px));
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-height: min(420px, 58vh);
    border-radius: 16px;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.18);
  }

  /* Add ad — camera button raised above bar */
  .mbn-btn--add {
    flex: 0 0 72px;
    position: relative;
    top: -18px;
    width: 60px;
    height: 60px;
    flex: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--burgundy-mid), var(--burgundy-deep));
    color: #fff !important;
    box-shadow: 0 4px 20px rgba(100, 20, 50, 0.35);
    border: 4px solid var(--bg-white);
    font-size: 22px;
    padding: 0;
    margin: 0 8px;
    align-self: flex-start;
    margin-top: -18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.18s, box-shadow 0.18s;
  }

  .mbn-btn--add:active {
    transform: scale(0.93);
    box-shadow: 0 2px 10px rgba(100, 20, 50, 0.25);
  }

  .mbn-btn--add i {
    font-size: 22px;
  }

  /* Push page content above bottom nav */
  .site-shell {
    padding: 12px 14px calc(80px + env(safe-area-inset-bottom, 0px));
  }

  .header-row {
    flex-wrap: nowrap;
    gap: 8px;
  }

  .header-brand {
    flex-shrink: 0;
    margin-left: auto;
  }

  .header-tools {
    margin-left: 0;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 6px;
  }

  /* Hide add-ad button from header on mobile (it's in bottom nav) */
  .search-row .btn-add-ad {
    display: none;
  }

  /* Hide icon btns from header on mobile (they're in bottom nav) */
  .header-tools .icon-btn {
    display: none;
  }

  /* Keep profile button in header */
  .profile-btn {
    padding: 4px 10px 4px 4px;
  }

  .icon-btn {
    width: 38px;
    height: 38px;
    font-size: 15px;
  }

  /* Square category tiles — desktop-style mobile web only (app mode uses circles) */
  html:not(.mobile-app-mode) .categories-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 20px 8px;
  }

  html:not(.mobile-app-mode) .category-card {
    width: 80px;
  }

  html:not(.mobile-app-mode) .category-card__img-wrap {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    padding: 10px;
  }

  html:not(.mobile-app-mode) .category-card__name {
    font-size: 12px;
  }

  /* VIP cards: single column on very small screens */
  .vip-grid {
    grid-template-columns: 1fr;
  }

  /* Search matches banner width on mobile */
  .search-row {
    flex-direction: column;
    max-width: var(--home-banner-width);
    margin-inline: auto;
  }

  .search-box {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 400px) {
  html:not(.mobile-app-mode) .categories-grid {
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 16px 6px;
  }

  html:not(.mobile-app-mode) .category-card {
    width: 72px;
  }

  html:not(.mobile-app-mode) .category-card__img-wrap {
    width: 72px;
    height: 72px;
  }
}

/* ── Mobile app mode (phone browser ≈ native app) ── */
@media (max-width: 767px) {
  html.mobile-app-mode .profile-dropdown {
    display: none !important;
  }

  html.mobile-app-mode .header-tools .notifications-wrap {
    display: none !important;
  }

  html.mobile-app-mode.home-body .header-row {
    justify-content: space-between;
    align-items: center;
  }

  html.mobile-app-mode.home-body .header-brand {
    margin-left: 0;
    flex: 1;
    display: flex;
    justify-content: center;
  }

  html.mobile-app-mode.home-body .profile-chevron {
    display: none;
  }

  html.mobile-app-mode.home-body .search-row {
    flex-direction: row !important;
    gap: 8px;
    align-items: stretch;
    max-width: none !important;
    margin-inline: 0 !important;
  }

  html.mobile-app-mode.home-body .btn-search-outer {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 10px 16px;
    border: none;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--burgundy-mid), var(--burgundy-deep));
    color: #fff;
    font-family: inherit;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
  }

  html.mobile-app-mode.home-body .search-box .btn-search--inline {
    display: none !important;
  }

  html.mobile-app-mode.home-body .search-box {
    flex: 1;
    min-width: 0;
  }

  html.mobile-app-mode .sharwat-contact-fab {
    display: none !important;
  }

  html.mobile-app-mode .mobile-bottom-nav {
    display: flex !important;
  }
}
