/* ==========================================================================
   SaleGaadi INDIA - Components
   ========================================================================== */

/* --------------------------------------------------------------------------
   Top Navbar
   -------------------------------------------------------------------------- */
.top-navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-subtle);
  padding: 10px 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Brand Logo */
.brand-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-logo-img {
  height: 38px;
  width: auto;
}

/* Location Selector */
.location-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  text-align: left;
  transition: var(--transition);
  cursor: pointer;
}
.location-btn:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.location-btn .loc-icon {
  width: 20px;
  height: 20px;
  color: var(--primary);
  flex-shrink: 0;
}

.loc-text {
  display: flex;
  flex-direction: column;
}

.loc-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 4px;
}

.loc-title svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.5;
}

.loc-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Desktop Search Bar */
.search-bar-wrap {
  flex: 1;
  max-width: 580px;
  position: relative;
}

.search-input-box {
  width: 100%;
  height: 44px;
  border-radius: var(--radius-full);
  padding: 0 44px 0 46px;
  border: 1.5px solid var(--border);
  background: var(--surface-alt);
  color: var(--text-main);
  font-size: 0.92rem;
  transition: var(--transition);
}

.search-input-box:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-icon-left {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--primary);
  pointer-events: none;
}

.search-clear-btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-muted);
  background: var(--border);
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  position: relative;
}
.icon-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

.icon-btn .badge-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: var(--accent-saffron);
  border-radius: 50%;
  border: 2px solid var(--surface);
}

.icon-btn .badge-count {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Primary "Sell / Post Ad" Button */
.btn-primary-sell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: #FFFFFF !important;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 14px var(--primary-glow);
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary-sell:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(11, 99, 246, 0.3);
}

/* --------------------------------------------------------------------------
   Mobile App Search Bar (Matches screenshot 1)
   -------------------------------------------------------------------------- */
.mobile-search-section {
  display: none;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border-light);
}

.mobile-search-box {
  width: 100%;
  height: 48px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--surface-alt);
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 12px;
}

.mobile-search-box input {
  border: none;
  background: transparent;
  width: 100%;
  font-size: 0.94rem;
  color: var(--text-main);
}

/* --------------------------------------------------------------------------
   Category Pills (Matches app horizontal chips)
   -------------------------------------------------------------------------- */
.category-section {
  padding: 12px 0 6px 0;
  background: transparent;
}

.category-scroll {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.category-scroll::-webkit-scrollbar {
  height: 4px;
}
.category-scroll::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  transition: var(--transition);
  cursor: pointer;
  box-shadow: var(--shadow-subtle);
}

.category-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.category-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 3px 12px var(--primary-glow);
}

/* --------------------------------------------------------------------------
   Hero Promotional Banner (Matching App Banner)
   -------------------------------------------------------------------------- */
.hero-banner-card {
  position: relative;
  background: linear-gradient(135deg, #0A63F8 0%, #0348C2 60%, #002D82 100%);
  border-radius: var(--radius-lg);
  overflow: hidden;
  color: #FFFFFF;
  margin: 14px 0 20px 0;
  box-shadow: 0 8px 30px rgba(11, 99, 246, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 32px;
  position: relative;
  z-index: 2;
}

.hero-content {
  max-width: 580px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.hero-headline {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.18;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.hero-headline span.yellow-highlight {
  color: #FFE600;
  text-shadow: 0 2px 10px rgba(255, 230, 0, 0.35);
}

.hero-sub {
  font-size: 0.98rem;
  opacity: 0.92;
  margin-bottom: 20px;
  line-height: 1.45;
}

/* Trust Badges matching App screenshot */
.hero-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
}

.hero-badge-pill svg {
  width: 15px;
  height: 15px;
  color: #FFE600;
}

.hero-banner-image-wrap {
  flex-shrink: 0;
  max-width: 420px;
  position: relative;
  text-align: right;
}

.hero-banner-image-wrap img {
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  max-height: 220px;
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   Filter & Search Toolbar
   -------------------------------------------------------------------------- */
.filter-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.filter-results-count {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
}

.filter-sort-select {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Listing Cards Grid (Replicating App Cards Exactly)
   -------------------------------------------------------------------------- */
.ads-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 36px;
}

@media (min-width: 768px) {
  .ads-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
}

@media (min-width: 1080px) {
  .ads-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }
}

.ad-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  text-decoration: none;
  color: inherit;
}

.ad-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(11, 99, 246, 0.4);
}

.ad-card-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #E2E8F0;
}

.ad-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.ad-card:hover .ad-card-thumb {
  transform: scale(1.04);
}

/* Floating Heart Button */
.fav-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.16);
  cursor: pointer;
  z-index: 5;
  transition: var(--transition);
  color: var(--primary);
}

.fav-btn:hover {
  background: #FFFFFF;
  transform: scale(1.1);
}

.fav-btn.is-favorite {
  color: var(--accent-heart);
  background: #FFFFFF;
}

.fav-btn.is-favorite svg {
  fill: var(--accent-heart);
}

.ad-card-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Price in vibrant electric blue matching screenshot */
.ad-card-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 4px;
  letter-spacing: -0.3px;
}

.ad-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.35;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 2.4em;
}

.ad-card-location {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ad-card-location svg {
  width: 14px;
  height: 14px;
  color: var(--text-light);
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Floating Action Button (+) for Post Ad
   -------------------------------------------------------------------------- */
.fab-post-btn {
  position: fixed;
  bottom: 86px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(11, 99, 246, 0.4);
  z-index: 90;
  cursor: pointer;
  transition: var(--transition);
}

.fab-post-btn:hover {
  transform: scale(1.08) rotate(90deg);
  background: var(--primary-hover);
}

.fab-post-btn svg {
  width: 28px;
  height: 28px;
  stroke-width: 2.5;
}

/* --------------------------------------------------------------------------
   Mobile Bottom Navigation Bar (Matches App Screenshots Exactly)
   -------------------------------------------------------------------------- */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 100;
  box-shadow: var(--shadow-nav);
  justify-content: space-around;
  align-items: center;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  transition: var(--transition);
  padding: 6px 0;
}

.bottom-nav-item svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
}

.bottom-nav-item.active {
  color: var(--primary);
}

.bottom-nav-item.active svg {
  stroke: var(--primary);
}

/* --------------------------------------------------------------------------
   Ad Details Page Components (Matches Pulsar 220f screenshot)
   -------------------------------------------------------------------------- */
.ad-detail-container {
  max-width: 900px;
  margin: 20px auto 40px auto;
  padding: 0 16px;
}

.ad-detail-hero-box {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
}

.ad-detail-img-wrap {
  position: relative;
  width: 100%;
  max-height: 480px;
  background: #000;
  overflow: hidden;
}

.ad-detail-img-wrap img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: contain;
  margin: 0 auto;
}

.ad-detail-top-bar {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  z-index: 10;
}

.circle-nav-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: var(--transition);
}
.circle-nav-btn:hover {
  background: #FFFFFF;
  color: var(--primary);
}

.ad-detail-content {
  padding: 22px;
}

.ad-detail-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}

.ad-detail-price {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 12px;
}

.ad-detail-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.ad-detail-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Key Specifications Grid (Year, Kilometer, etc.) */
.specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 22px 0;
}

@media (min-width: 600px) {
  .specs-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.spec-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.spec-icon-box {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.spec-icon-box svg {
  width: 22px;
  height: 22px;
}

.spec-info-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
}

.spec-info-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Description Section */
.detail-section-block {
  margin: 24px 0;
}

.detail-section-heading {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
}

.detail-description-text {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-secondary);
  background: var(--surface-alt);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  white-space: pre-line;
}

/* Seller Card */
.seller-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin: 24px 0;
  box-shadow: var(--shadow-subtle);
}

.seller-profile-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.seller-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

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

.seller-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.seller-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.seller-email {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.seller-action-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(11, 99, 246, 0.2);
  cursor: pointer;
}
.seller-action-icon:hover {
  background: var(--primary);
  color: #FFF;
}

/* Sticky Action Bar matching Bottom of Screenshot 4 */
.detail-cta-bar {
  display: flex;
  gap: 14px;
  margin-top: 24px;
  position: sticky;
  bottom: 16px;
  background: var(--surface);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
  z-index: 50;
}

.btn-cta-outline {
  flex: 1;
  height: 48px;
  border: 2px solid var(--primary);
  color: var(--primary);
  border-radius: var(--radius-full);
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
}
.btn-cta-outline:hover {
  background: var(--primary-light);
}

.btn-cta-solid {
  flex: 1;
  height: 48px;
  background: var(--primary);
  color: #FFFFFF;
  border-radius: var(--radius-full);
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-cta-solid:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 16px var(--primary-glow);
}

/* --------------------------------------------------------------------------
   Profile Screen Components (Matches Screenshot 3)
   -------------------------------------------------------------------------- */
.profile-container {
  max-width: 680px;
  margin: 24px auto 50px auto;
  padding: 0 16px;
}

.profile-card-top {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 24px;
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
}

.profile-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.profile-avatar-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-avatar-img {
  width: 68px;
  height: 68px;
  border-radius: var(--radius-md);
  border: 2px solid var(--border);
  object-fit: cover;
  background: #FFF;
}

.profile-user-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.verified-badge-icon {
  width: 18px;
  height: 18px;
  color: var(--accent-yellow);
}

.profile-user-email {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.profile-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.profile-stat-box {
  background: var(--surface-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: center;
}

.profile-stat-num {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
}

.profile-stat-label {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Profile Menu Items List */
.profile-menu-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  margin-bottom: 16px;
}

.profile-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.profile-menu-item:last-child {
  border-bottom: none;
}

.profile-menu-item:hover {
  background: var(--surface-alt);
  color: var(--primary);
}

.menu-item-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.menu-item-icon {
  width: 22px;
  height: 22px;
  color: var(--text-secondary);
}

.profile-menu-item:hover .menu-item-icon {
  color: var(--primary);
}

/* Switch Toggle for Dark Theme */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #CBD5E1;
  transition: .3s;
  border-radius: 34px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .toggle-slider {
  background-color: var(--primary);
}

input:checked + .toggle-slider:before {
  transform: translateX(22px);
}

/* --------------------------------------------------------------------------
   Post Ad Form Components
   -------------------------------------------------------------------------- */
.post-ad-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin: 24px 0 40px 0;
}

@media (min-width: 900px) {
  .post-ad-grid {
    grid-template-columns: 1.4fr 1fr;
  }
}

.form-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface-alt);
  font-size: 0.92rem;
}
.form-control:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

textarea.form-control {
  height: 110px;
  padding: 12px 14px;
  resize: vertical;
}

.upload-dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 28px 16px;
  text-align: center;
  background: var(--surface-alt);
  cursor: pointer;
  transition: var(--transition);
}
.upload-dropzone:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.upload-icon {
  width: 44px;
  height: 44px;
  color: var(--primary);
  margin: 0 auto 10px auto;
}

/* --------------------------------------------------------------------------
   Modals
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 0.25s ease;
}

.modal-backdrop.is-open .modal-dialog {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-light);
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
}

.modal-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}
.modal-close-btn:hover {
  background: var(--surface-alt);
  color: var(--text-main);
}

.modal-body {
  padding: 20px 22px;
}

/* Footer (Desktop) */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 40px 0 20px 0;
  margin-top: 50px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

.footer-col-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 14px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--border-light);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 12px;
}

/* Social Follow Icons */
.social-follow-wrap {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.social-follow-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.social-icons-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.social-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1px solid var(--border);
  color: #4B5563;
  text-decoration: none;
  transition: all 0.22s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
}

.social-icon-btn svg {
  display: block;
}

.social-icon-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.social-icon-btn.facebook:hover {
  background: #1877F2;
  border-color: #1877F2;
  color: #FFFFFF;
}

.social-icon-btn.instagram:hover {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
  border-color: #d6249f;
  color: #FFFFFF;
}

.social-icon-btn.youtube:hover {
  background: #FF0000;
  border-color: #FF0000;
  color: #FFFFFF;
}
