/**
 * Savdo.tj - Dedicated Mobile Version Styles
 * Designed to pixel-match iOS/Android native app interfaces.
 */

:root {
  --primary-blue: #007aff;
  --primary-blue-hover: #0062cc;
  --text-primary: #1c1c1e;
  --text-secondary: #3a3a3c;
  --text-muted: #8e8e93;
  --bg-page: #ffffff;
  --bg-card: #f5f6f8;
  --bg-card-hover: #eceef1;
  --bg-input: #f2f3f5;
  --border-light: #e5e5ea;
  --badge-top: #ffcc00;
  --badge-danger: #ff3b30;
  --badge-viewed: rgba(0, 0, 0, 0.65);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  padding-bottom: calc(65px + var(--safe-bottom));
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ==========================================================================
   1. APP HEADER & SEARCH BAR WITH TICKER
   ========================================================================== */
.m-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: #ffffff;
  padding: 8px 14px 6px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.m-header-inner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.m-search-box {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border-radius: 12px;
  height: 44px;
  padding: 0 12px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background 0.15s ease;
}

.m-search-box:active {
  background: #e9eaec;
}

.m-search-icon {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.m-search-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* 🔄 DYNAMIC ROTATING CURRENCY TICKER */
.m-ticker-container {
  flex: 1;
  height: 22px;
  position: relative;
  overflow: hidden;
  margin-left: 8px;
}

.m-ticker-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  font-size: 14.5px;
  font-weight: 500;
  color: #636366;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.38s ease, transform 0.38s ease;
  pointer-events: none;
}

.m-ticker-item.active {
  opacity: 1;
  transform: translateY(0);
}

.m-ticker-item.exit {
  opacity: 0;
  transform: translateY(-16px);
}

/* 🎬 GRADIENT REELS BUTTON IN HEADER */
.m-reels-header-btn {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: transform 0.15s ease;
}

.m-reels-header-btn:active {
  transform: scale(0.92);
}

.m-reels-header-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   2. CATEGORIES 2x4 GRID
   ========================================================================== */
.m-categories-section {
  padding: 6px 14px 12px;
}

.m-categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.m-cat-card {
  background: var(--bg-card);
  border-radius: 13px;
  padding: 8px 6px;
  height: 78px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.m-cat-card:active {
  background-color: var(--bg-card-hover);
  transform: scale(0.97);
}

.m-cat-title {
  font-size: 11px;
  line-height: 1.2;
  font-weight: 600;
  color: var(--text-primary);
  max-width: 85%;
  word-break: break-word;
  z-index: 2;
  position: relative;
}

.m-cat-badge-soon {
  display: inline-block;
  background: var(--badge-danger);
  color: #ffffff;
  font-size: 8.5px;
  font-weight: 800;
  padding: 1.5px 5px;
  border-radius: 4px;
  margin-top: 3px;
  width: fit-content;
  letter-spacing: 0.3px;
  z-index: 2;
}

.m-cat-img-box {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 66px;
  height: 58px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  pointer-events: none;
  z-index: 1;
}

.m-cat-img-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: right bottom;
  transform: scale(1.55);
  transform-origin: right bottom;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.04));
}

/* 🚗📱💻✈️🏗️ Custom Enlarged Scales for each Category Illustration */
.m-cat-card[data-cat="transport"] .m-cat-img-box img {
  transform: scale(2.15) translate(2px, 2px);
  transform-origin: right bottom;
}

.m-cat-card[data-cat="telefony"] .m-cat-img-box img {
  transform: scale(2.05) translate(1px, 1px);
  transform-origin: right bottom;
}

.m-cat-card[data-cat="nedvizhimost"] .m-cat-img-box img {
  transform: scale(1.7) translate(2px, 2px);
  transform-origin: right bottom;
}

.m-cat-card[data-cat="new-buildings"] .m-cat-img-box img {
  transform: scale(1.75) translate(2px, 2px);
  transform-origin: right bottom;
}

.m-cat-card[data-cat="travel"] .m-cat-img-box img {
  transform: scale(1.8) translate(2px, 2px);
  transform-origin: right bottom;
}

.m-cat-card[data-cat="home"] .m-cat-img-box img {
  transform: scale(1.75) translate(2px, 2px);
  transform-origin: right bottom;
}

.m-cat-card[data-cat="vakasiya"] .m-cat-img-box img {
  transform: scale(1.75) translate(2px, 2px);
  transform-origin: right bottom;
}

.m-cat-hamburger {
  font-size: 28px;
  font-weight: 700;
  color: #2c2c2e;
  line-height: 1;
  margin-right: 6px;
  margin-bottom: 4px;
}

/* ==========================================================================
   3. STORIES HORIZONTAL CAROUSEL
   ========================================================================== */
.m-stories-section {
  padding: 6px 0 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.m-stories-scroll {
  display: flex;
  gap: 12px;
  padding: 0 14px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.m-stories-scroll::-webkit-scrollbar {
  display: none;
}

.m-story-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 72px;
  flex-shrink: 0;
  cursor: pointer;
  text-decoration: none;
}

.m-story-item:active {
  opacity: 0.85;
}

.m-story-ring {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  padding: 2.5px;
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.m-story-ring.viewed {
  background: #d1d5db !important;
}

.m-story-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ffffff;
  background: #ffffff;
}

.m-story-title {
  font-size: 11px;
  line-height: 1.2;
  color: var(--text-primary);
  text-align: center;
  margin-top: 6px;
  width: 100%;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ==========================================================================
   4. HORIZONTAL SECTION: «ЭЛЕКТРОМОБИЛИ»
   ========================================================================== */
.m-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 14px 8px;
}

.m-section-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.m-section-all-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 2px;
}

.m-cars-scroll {
  display: flex;
  gap: 12px;
  padding: 0 14px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.m-cars-scroll::-webkit-scrollbar {
  display: none;
}

.m-car-card {
  width: 154px;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.m-car-card:active {
  opacity: 0.9;
}

.m-car-thumb-wrap {
  width: 154px;
  height: 116px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background: #f0f0f2;
}

.m-car-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.m-badge-vip {
  position: absolute;
  top: 7px;
  left: 7px;
  background: var(--badge-top);
  color: #000000;
  font-size: 11px;
  font-weight: 900;
  padding: 2.5px 7.5px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  z-index: 2;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.m-badge-top {
  position: absolute;
  top: 7px;
  left: 7px;
  background: #ef4444;
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  padding: 2.5px 7.5px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  z-index: 2;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.m-car-price {
  font-size: 16.5px;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 8px;
  line-height: 1.2;
}

.m-car-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: 3px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.m-car-city {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ==========================================================================
   5. HORIZONTAL SECTION: «ВИДЕО REELS»
   ========================================================================== */
.m-reels-scroll {
  display: flex;
  gap: 10px;
  padding: 0 14px 18px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  overscroll-behavior-x: contain;
}

.m-reels-scroll::-webkit-scrollbar {
  display: none;
}

.m-reel-item {
  width: 112px;
  height: 184px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background: #1c1c1e;
  cursor: pointer;
}

.m-reel-item:active {
  transform: scale(0.97);
}

.m-reel-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.m-reel-play-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.m-reel-play-btn svg {
  width: 12px;
  height: 12px;
  fill: #ffffff;
  margin-left: 2px;
}

.m-reel-bottom-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
}

.m-reel-meta {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  color: #ffffff;
  z-index: 2;
}

.m-reel-title {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.m-reel-views {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 3px;
}

/* ==========================================================================
   6. 2-COLUMN RECOMMENDED ADS GRID
   ========================================================================== */
.m-recommended-section {
  padding: 6px 14px 20px;
}

.m-ads-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.m-ad-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: transparent;
}

.m-ad-card:active {
  opacity: 0.9;
}

.m-ad-thumb-box {
  position: relative;
  width: 100%;
  padding-top: 75%; /* 4:3 aspect ratio */
  border-radius: 12px;
  overflow: hidden;
  background: #f0f0f2;
}

.m-ad-thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 👁 "ПРОСМОТРЕНО" BADGE (MATCHING SCREENSHOT) */
.m-badge-viewed {
  position: absolute;
  bottom: 7px;
  right: 7px;
  background: var(--badge-viewed);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 10px;
  font-weight: 500;
  padding: 2.5px 7px;
  border-radius: 6px;
  pointer-events: none;
  display: none;
}

.m-ad-card.is-viewed .m-badge-viewed {
  display: block;
}

.m-ad-price {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 8px;
  line-height: 1.2;
}

.m-ad-title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.m-ad-city {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* 🔄 LOAD MORE BUTTON / SPINNER */
.m-load-more-wrap {
  display: flex;
  justify-content: center;
  padding: 20px 0 10px;
}

.m-load-more-btn {
  background: #f2f3f5;
  color: var(--text-primary);
  font-size: 14.5px;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.m-load-more-btn:active {
  background: #e4e6ea;
}

/* ==========================================================================
   7. FIXED BOTTOM NAVIGATION BAR (5 TABS)
   ========================================================================== */
.m-tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 6px 0;
  padding-bottom: max(6px, var(--safe-bottom));
  z-index: 900;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.03);
}

.m-tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-decoration: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s ease;
}

.m-tab-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.m-tab-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.m-tab-label {
  font-size: 10px;
  font-weight: 600;
  margin-top: 3px;
  letter-spacing: -0.1px;
}

/* Active Tab: Поиск */
.m-tab-item.active {
  color: var(--primary-blue);
}

.m-tab-item.active .m-tab-icon svg {
  fill: var(--primary-blue);
  stroke: var(--primary-blue);
}

/* ==========================================================================
   8. MODALS: STORIES FULLSCREEN VIEWER & REELS PLAYER
   ========================================================================== */
.m-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #000000;
  z-index: 99999;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.m-modal-overlay.active {
  display: flex;
}

/* Stories Modal */
.m-story-viewer-box {
  width: 100%;
  max-width: 480px;
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #000;
}

.m-story-progress-bar {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  height: 3px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 2px;
  z-index: 10;
  overflow: hidden;
}

.m-story-progress-fill {
  width: 0%;
  height: 100%;
  background: #ffffff;
  border-radius: 2px;
  transition: width 0.1s linear;
}

.m-story-modal-header {
  position: absolute;
  top: 22px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}

.m-story-author-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.m-story-author-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid #fff;
  object-fit: cover;
}

.m-story-author-name {
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

.m-story-close-btn {
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.m-story-media-wrap {
  flex: 1;
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.m-story-media-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.m-story-bottom-action {
  position: absolute;
  bottom: 24px;
  left: 16px;
  right: 16px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.m-story-info-card {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  padding: 10px 14px;
  border-radius: 12px;
  color: #fff;
}

.m-story-info-title {
  font-size: 14px;
  font-weight: 600;
}

.m-story-info-price {
  font-size: 16px;
  font-weight: 800;
  color: #ffcc00;
  margin-top: 2px;
}

.m-story-cta-btn {
  background: linear-gradient(135deg, #007aff, #0056b3);
  color: #ffffff;
  padding: 14px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  display: block;
}

/* ==========================================================================
   REELS MODAL: FULL VERTICAL SCROLL FEED (TIKTOK / INSTAGRAM STYLE)
   ========================================================================== */
.m-reels-feed {
  width: 100%;
  height: 100%;
  max-width: 500px;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
}

.m-reels-feed::-webkit-scrollbar {
  display: none;
}

.m-reels-slide {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000;
  overflow: hidden;
}

.m-reels-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.m-reels-center-icon {
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: scale(0.85);
  z-index: 15;
}

.m-reels-center-icon.visible {
  opacity: 1;
  transform: scale(1);
}

.m-reels-close-btn {
  position: absolute;
  top: max(16px, env(safe-area-inset-top, 16px));
  left: 16px;
  z-index: 30;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.m-reels-sound-btn {
  position: absolute;
  top: max(16px, env(safe-area-inset-top, 16px));
  right: 16px;
  z-index: 30;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.m-reels-actions-bar {
  position: absolute;
  bottom: 80px;
  right: 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  z-index: 20;
  align-items: center;
}

.m-reels-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
}

.m-reels-action-btn.liked .m-reels-action-icon svg {
  fill: #ff2e63;
  transform: scale(1.15);
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.m-reels-action-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.m-reels-action-icon svg {
  width: 24px;
  height: 24px;
  fill: #fff;
}

.m-reels-action-label {
  font-size: 11px;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0,0,0,0.7);
}

.m-reels-info-overlay {
  position: absolute;
  bottom: max(24px, env(safe-area-inset-bottom, 24px));
  left: 16px;
  right: 80px;
  z-index: 20;
  color: #ffffff;
  pointer-events: none;
}

.m-reels-author-name {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.m-reels-caption {
  font-size: 13px;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* ==========================================================================
   10. MOBILE AD DETAIL PAGE (FLUTTER OPTIMIZED PRODUCT DETAILS)
   ========================================================================== */
.m-ad-detail-body {
  background-color: #ffffff;
  padding-bottom: calc(76px + var(--safe-bottom));
}

.m-detail-appbar {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  background: #ffffff;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
}

.m-appbar-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #1c1c1e;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.15s ease;
}

.m-appbar-btn:active {
  background: rgba(0, 0, 0, 0.06);
}

.m-appbar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.m-fav-icon {
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.m-fav-icon.active {
  fill: #ff3b30;
  stroke: #ff3b30;
  transform: scale(1.15);
}

/* 🖼️ CAROUSEL */
.m-carousel-wrapper {
  position: relative;
  width: 100%;
  height: calc(100vw * 0.75);
  max-height: 380px;
  background: #f8f9fa;
  overflow: hidden;
}

.m-carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.m-carousel-track::-webkit-scrollbar {
  display: none;
}

.m-carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f2f2f7;
  cursor: pointer;
}

.m-carousel-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f8f9fa;
}

.m-carousel-slide.is-video {
  background: #000;
}

.m-carousel-slide.is-video .m-carousel-img {
  opacity: 0.7;
}

.m-video-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: #007aff;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.35);
  z-index: 2;
}

.m-video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  z-index: 2;
}

.m-carousel-counter {
  position: absolute;
  bottom: 12px;
  right: 14px;
  background: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 14px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  letter-spacing: 0.5px;
  z-index: 3;
}

/* 📝 CONTENT BODY */
.m-detail-content {
  padding: 14px 16px 24px;
}

.m-detail-meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #8e8e93;
  font-size: 13px;
  margin-bottom: 6px;
}

.m-meta-views {
  display: flex;
  align-items: center;
  gap: 4px;
}

.m-detail-price {
  font-size: 26px;
  font-weight: 800;
  color: #1c1c1e;
  line-height: 1.15;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.m-detail-title {
  font-size: 18px;
  font-weight: 400;
  color: #1c1c1e;
  line-height: 1.35;
  margin-bottom: 14px;
}

.m-detail-divider {
  border: none;
  height: 1px;
  background: #e5e5ea;
  margin: 14px 0;
}

/* 📋 SPECIFICATIONS TABLE */
.m-specs-section {
  padding: 4px 0;
}

.m-specs-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.m-spec-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.4;
}

.m-spec-label {
  flex: 4;
  color: #1c1c1e;
  font-weight: 400;
}

.m-spec-value {
  flex: 6;
  color: #1c1c1e;
  font-weight: 700;
  text-align: left;
}

.m-spec-value.is-blue {
  color: #007aff !important;
}

/* 📄 DESCRIPTION */
.m-desc-section {
  padding: 4px 0;
}

.m-block-title {
  font-size: 18px;
  font-weight: 700;
  color: #1c1c1e;
  margin-bottom: 10px;
}

.m-desc-wrapper {
  position: relative;
  overflow: hidden;
  max-height: 96px;
  transition: max-height 0.3s ease;
}

.m-desc-wrapper.is-expanded {
  max-height: 2000px;
}

.m-desc-content {
  font-size: 15px;
  line-height: 1.5;
  color: #3a3a3c;
  word-break: break-word;
}

.m-desc-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 38px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #ffffff);
  pointer-events: none;
}

.m-desc-wrapper.is-expanded .m-desc-fade {
  display: none;
}

.m-desc-toggle-btn {
  background: none;
  border: none;
  color: #007aff;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 0 0;
  cursor: pointer;
  display: inline-block;
}

/* 🍞 BREADCRUMBS */
.m-breadcrumbs-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  padding: 4px 0 10px;
}

.m-breadcrumb-home {
  display: flex;
  align-items: center;
}

.m-breadcrumb-sep {
  color: #c7c7cc;
  font-weight: 700;
  font-size: 11px;
}

.m-breadcrumb-item {
  color: #007aff;
  font-weight: 400;
}

.m-breadcrumb-item.is-last {
  color: #1c1c1e;
  font-weight: 500;
}

/* 👤 SELLER PROFILE CARD */
.m-seller-section {
  padding: 6px 0 10px;
}

.m-seller-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f2f1ef;
  padding: 8px 12px 8px 8px;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}

.m-seller-card:active {
  background: #e8e7e4;
}

.m-seller-avatar-box {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.m-seller-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.m-seller-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e5e5ea;
}

.m-seller-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.m-seller-name-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.m-seller-name {
  font-size: 15px;
  font-weight: 700;
  color: #1c1c1e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.m-verified-icon {
  flex-shrink: 0;
}

.m-seller-sub {
  font-size: 13px;
  color: #1c1c1e;
}

.m-seller-date {
  font-size: 12px;
  color: #8e8e93;
}

.m-seller-chevron {
  flex-shrink: 0;
}

.m-report-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #8e8e93;
  background: none;
  border: none;
  font-size: 13px;
  padding: 8px 2px 2px;
  cursor: pointer;
}

/* 🎯 RELATED SECTION */
.m-related-section {
  padding-top: 10px;
}

/* ⚡ STICKY BOTTOM ACTION BAR */
.m-sticky-action-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 0.5px solid rgba(0, 0, 0, 0.12);
  padding: 8px 16px calc(8px + var(--safe-bottom));
}

.m-sticky-bar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 540px;
  margin: 0 auto;
}

.m-btn-call {
  flex: 1;
  height: 48px;
  background: #1c1c1e;
  color: #ffffff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.1s, background 0.15s;
}

.m-btn-call:active {
  transform: scale(0.98);
  background: #2c2c2e;
}

.m-btn-chat {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  background: #19a855;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.1s, background 0.15s;
}

.m-btn-chat:active {
  transform: scale(0.96);
  background: #158b46;
}

/* 🔍 FULLSCREEN LIGHTBOX */
.m-lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  background: #000000;
  display: none;
  flex-direction: column;
}

.m-lightbox-modal.is-active {
  display: flex;
}

.m-lightbox-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px calc(14px + env(safe-area-inset-top, 0px));
  color: #ffffff;
  z-index: 10;
}

.m-lightbox-counter {
  font-size: 15px;
  font-weight: 600;
}

.m-lightbox-close {
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.m-lightbox-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.m-lightbox-content img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  transition: transform 0.2s ease;
}

.m-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  transition: background 0.15s;
}

.m-lightbox-nav:active {
  background: rgba(255, 255, 255, 0.35);
}

.m-lightbox-nav.prev {
  left: 12px;
}

.m-lightbox-nav.next {
  right: 12px;
}

/* 🍞 TOAST NOTIFICATION */
.m-toast {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(28, 28, 30, 0.94);
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 24px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 10000;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.m-toast.is-shown {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

