/* ==========================================================================
   Uttara Classified - Modern Responsive Stylesheet
   Designed for Desktop, Tablet, and Mobile
   Target Market: Roorkee, District Haridwar, Uttarakhand, India
   ========================================================================== */

:root {
  --primary: #1E3A8A;
  --primary-dark: #172554;
  --primary-light: #3B82F6;
  --primary-soft: #EFF6FF;
  --accent: #D97706;
  --accent-light: #F59E0B;
  --accent-soft: #FEF3C7;
  --success: #059669;
  --success-soft: #ECFDF5;
  --danger: #DC2626;
  --danger-soft: #FEF2F2;
  --warning: #D97706;
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --surface-alt: #F1F5F9;
  --border: #E2E8F0;
  --border-strong: #CBD5E1;
  --text: #0F172A;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --max-w: 1240px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 15px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* ==========================================================================
   Header & Navbar
   ========================================================================== */
.top-notice-bar {
  background: linear-gradient(90deg, #1E3A8A, #1E40AF);
  color: #FFFFFF;
  font-size: 12.5px;
  padding: 6px 0;
  text-align: center;
}

.top-notice-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-notice-bar .location-pin {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.15);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-weight: 500;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 20px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.brand-logo svg {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.brand-logo .brand-badge {
  font-size: 11px;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  letter-spacing: 0;
  margin-left: -4px;
}

.header-search {
  flex: 1;
  max-width: 580px;
}

.search-bar-form {
  display: flex;
  background: var(--surface-alt);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}

.search-bar-form:focus-within {
  border-color: var(--primary-light);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.search-select-city {
  border: none;
  background: transparent;
  padding: 0 12px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  border-right: 1px solid var(--border);
  outline: none;
  cursor: pointer;
  max-width: 140px;
}

.search-input-text {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 14px;
  font-size: 14px;
  outline: none;
  color: var(--text);
  min-width: 140px;
}

.search-btn-submit {
  border: none;
  background: var(--primary);
  color: #FFFFFF;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.search-btn-submit:hover {
  background: var(--primary-dark);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: var(--radius);
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  text-align: center;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 12px 24px;
  font-size: 16px;
  border-radius: var(--radius);
}

.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: #FFFFFF;
}

.btn-accent {
  background: var(--accent);
  color: #FFFFFF;
}

.btn-accent:hover {
  background: #B45309;
  color: #FFFFFF;
}

.btn-post-ad {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #FFFFFF;
  box-shadow: 0 2px 4px rgba(217, 119, 6, 0.25);
}

.btn-post-ad:hover {
  background: linear-gradient(135deg, #D97706, #B45309);
  color: #FFFFFF;
  box-shadow: 0 4px 8px rgba(217, 119, 6, 0.35);
  transform: translateY(-1px);
}

.btn-outline {
  border-color: var(--border-strong);
  color: var(--text);
  background: var(--surface);
}

.btn-outline:hover {
  background: var(--surface-alt);
  border-color: var(--text-muted);
}

.btn-outline-primary {
  border-color: var(--primary);
  color: var(--primary);
  background: transparent;
}

.btn-outline-primary:hover {
  background: var(--primary-soft);
}

.btn-whatsapp {
  background: #25D366;
  color: #FFFFFF;
}

.btn-whatsapp:hover {
  background: #1EBE5D;
  color: #FFFFFF;
}

.btn-danger {
  background: var(--danger);
  color: #FFFFFF;
}

.btn-danger:hover {
  background: #B91C1C;
}

/* Category Navigation Bar */
.category-nav-strip {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.category-nav-strip::-webkit-scrollbar {
  display: none;
}

.category-nav-strip ul {
  display: flex;
  list-style: none;
  gap: 4px;
  padding: 6px 0;
}

.category-nav-strip a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius-full);
}

.category-nav-strip a:hover,
.category-nav-strip a.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  background: linear-gradient(135deg, #0F172A 0%, #1E3A8A 50%, #1E40AF 100%);
  color: #FFFFFF;
  padding: 44px 0 54px;
  position: relative;
  overflow: hidden;
}

.hero-section::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h40v40H0V0zm1 1h38v38H1V1z' fill='%23ffffff' fill-opacity='0.03' fill-rule='evenodd'/%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  color: #FEF3C7;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-title {
  font-size: 38px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}

.hero-subtitle {
  font-size: 17px;
  color: #E2E8F0;
  margin-bottom: 30px;
  line-height: 1.5;
}

.hero-search-box {
  background: var(--surface);
  padding: 8px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-search-box .search-select-city,
.hero-search-box .search-select-cat {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-alt);
  padding: 12px 14px;
  font-size: 14px;
  outline: none;
  font-weight: 500;
}

.hero-search-box .search-input-keyword {
  flex: 1;
  min-width: 220px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-alt);
  padding: 12px 16px;
  font-size: 14px;
  outline: none;
}

.hero-quick-locations {
  margin-top: 22px;
  font-size: 13.5px;
  color: #CBD5E1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-quick-locations a {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.12);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
}

.hero-quick-locations a:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ==========================================================================
   Category Grid
   ========================================================================== */
.section {
  padding: 48px 0;
}

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px;
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

.section-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}

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

.category-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 14px;
  text-align: center;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}

.category-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
}

.category-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-card-icon svg {
  width: 24px;
  height: 24px;
}

.category-card-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}

.category-card-count {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* ==========================================================================
   Listings Grid & Cards
   ========================================================================== */
.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 22px;
}

.listing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.listing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.listing-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #E2E8F0;
  overflow: hidden;
}

.listing-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.listing-card:hover .listing-card-media img {
  transform: scale(1.03);
}

.badge-featured {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--accent);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.badge-condition {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(15, 23, 42, 0.75);
  color: #FFFFFF;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(4px);
  text-transform: capitalize;
}

.btn-save-listing {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.btn-save-listing:hover,
.btn-save-listing.saved {
  background: #FFFFFF;
  color: var(--danger);
}

.btn-save-listing svg {
  width: 18px;
  height: 18px;
}

.listing-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.listing-card-price {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.listing-card-price .price-free {
  color: var(--success);
  font-weight: 800;
}

.listing-card-price .price-contact {
  color: var(--primary);
  font-size: 15px;
  font-weight: 700;
}

.listing-card-price .text-negotiable {
  font-size: 11.5px;
  font-weight: normal;
  color: var(--text-muted);
}

.listing-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.listing-card-title a {
  color: var(--text);
}

.listing-card-title a:hover {
  color: var(--primary);
}

.listing-card-specs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.spec-chip {
  background: var(--surface-alt);
  font-size: 11.5px;
  color: var(--text-muted);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.listing-card-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.listing-location {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 170px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   Filter Layout & Sidebar
   ========================================================================== */
.browse-layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 28px;
  align-items: start;
}

.filter-sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 90px;
}

.filter-group {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.filter-group:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.filter-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.filter-clear-link {
  font-size: 12px;
  color: var(--primary);
  font-weight: normal;
}

.form-control, .form-select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: var(--transition);
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.price-inputs {
  display: flex;
  gap: 8px;
  align-items: center;
}

.price-inputs input {
  width: 50%;
}

.browse-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.browse-results-count {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.browse-sort-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.browse-sort-controls select {
  padding: 6px 12px;
  font-size: 13.5px;
}

.active-filter-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.filter-tag {
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12.5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filter-tag a {
  color: var(--primary);
  font-weight: bold;
}

/* ==========================================================================
   Detail Page Styles
   ========================================================================== */
.listing-detail-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  align-items: start;
}

.gallery-container {
  background: #0F172A;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}

.gallery-main-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000;
}

.gallery-main-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.gallery-thumbnails {
  display: flex;
  gap: 10px;
  padding: 12px;
  background: #1E293B;
  overflow-x: auto;
}

.gallery-thumb {
  width: 80px;
  height: 60px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  opacity: 0.6;
  border: 2px solid transparent;
  transition: var(--transition);
  flex-shrink: 0;
}

.gallery-thumb.active,
.gallery-thumb:hover {
  opacity: 1;
  border-color: var(--primary-light);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.detail-header-price {
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
}

.detail-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 16px;
  color: var(--text);
}

.detail-meta-strip {
  display: flex;
  gap: 16px;
  font-size: 13.5px;
  color: var(--text-muted);
  flex-wrap: wrap;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
}

.specs-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.specs-table td.label {
  color: var(--text-muted);
  width: 40%;
  font-weight: 500;
}

.specs-table td.value {
  color: var(--text);
  font-weight: 600;
}

.specs-table tr:last-child td {
  border-bottom: none;
}

.seller-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 90px;
}

.seller-header {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 20px;
}

.seller-avatar {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
}

.seller-info h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.seller-badge-verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--success);
  font-size: 12px;
  font-weight: 600;
}

.seller-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.phone-reveal-box {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 700;
  font-size: 15px;
  color: var(--primary);
}

.phone-reveal-box:hover {
  background: var(--primary-soft);
}

.safety-tips-box {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: var(--radius);
  padding: 18px;
  margin-top: 24px;
}

.safety-tips-box h4 {
  color: #B45309;
  font-size: 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.safety-tips-box ul {
  padding-left: 20px;
  font-size: 13px;
  color: #92400E;
}

.safety-tips-box li {
  margin-bottom: 6px;
}

/* ==========================================================================
   Post Listing Wizard & Forms
   ========================================================================== */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  max-width: 800px;
  margin: 0 auto;
}

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

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 7px;
}

.form-text {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 5px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.image-upload-zone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 32px 20px;
  text-align: center;
  background: var(--surface-alt);
  cursor: pointer;
  transition: var(--transition);
}

.image-upload-zone:hover {
  border-color: var(--primary-light);
  background: var(--primary-soft);
}

.image-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.image-preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

.image-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(220, 38, 38, 0.85);
  color: #FFFFFF;
  border: none;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ==========================================================================
   Dashboard & Admin Tables
   ========================================================================== */
.dashboard-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  align-items: start;
}

.dashboard-sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.dashboard-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.dashboard-nav-item:hover,
.dashboard-nav-item.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}

.dashboard-nav-item:last-child {
  border-bottom: none;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.data-table th {
  background: var(--surface-alt);
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 14px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.badge-status {
  display: inline-block;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: capitalize;
}

.badge-active { background: var(--success-soft); color: var(--success); }
.badge-pending { background: var(--accent-soft); color: var(--accent); }
.badge-rejected { background: var(--danger-soft); color: var(--danger); }
.badge-expired { background: var(--surface-alt); color: var(--text-muted); }
.badge-sample { background: #E0E7FF; color: #4338CA; font-size: 10px; margin-left: 6px; }

/* Stats cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.stat-num {
  font-size: 30px;
  font-weight: 800;
  color: var(--text);
  margin-top: 6px;
}

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

/* Sample data admin warning banner */
.sample-banner {
  background: #EEF2FF;
  border: 1px solid #C7D2FE;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sample-banner-text {
  font-size: 14px;
  color: #3730A3;
}

/* ==========================================================================
   Modals & Toasts
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-overlay.open {
  visibility: visible;
  opacity: 1;
}

.modal-content {
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  padding: 28px;
}

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

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-muted);
}

.flash-message {
  padding: 12px 18px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flash-success { background: var(--success-soft); color: var(--success); border: 1px solid #A7F3D0; }
.flash-danger { background: var(--danger-soft); color: var(--danger); border: 1px solid #FECACA; }
.flash-warning { background: var(--accent-soft); color: var(--accent); border: 1px solid #FDE68A; }
.flash-info { background: var(--primary-soft); color: var(--primary); border: 1px solid #BFDBFE; }

/* ==========================================================================
   Breadcrumbs & Pagination
   ========================================================================== */
.breadcrumb-container {
  margin: 18px 0;
}

.breadcrumb {
  display: flex;
  list-style: none;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  margin-right: 8px;
  color: var(--text-light);
}

.breadcrumb-item a {
  color: var(--text-muted);
}

.breadcrumb-item a:hover {
  color: var(--primary);
}

.breadcrumb-item.active {
  color: var(--text);
  font-weight: 600;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 36px;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.page-link:hover,
.page-link.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
}

/* ==========================================================================
   Footer & Mobile Bar
   ========================================================================== */
.site-footer {
  background: #0B1120;
  color: #94A3B8;
  margin-top: auto;
  padding-top: 56px;
  border-top: 1px solid #1E293B;
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 48px;
}

.footer-col h4 {
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 18px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 9px;
}

.footer-col a {
  color: #94A3B8;
}

.footer-col a:hover {
  color: #FFFFFF;
}

.footer-bottom {
  border-top: 1px solid #1E293B;
  padding: 22px 0;
  font-size: 13px;
  text-align: center;
}

/* Mobile Bottom Bar */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 58px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 999;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
}

.mobile-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 10.5px;
  color: var(--text-muted);
  gap: 3px;
}

.mobile-bar-item.active {
  color: var(--primary);
  font-weight: 600;
}

.mobile-bar-item svg {
  width: 20px;
  height: 20px;
}

.mobile-post-btn {
  background: var(--accent);
  color: #FFFFFF !important;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -16px;
  box-shadow: 0 4px 10px rgba(217, 119, 6, 0.4);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 992px) {
  .browse-layout {
    grid-template-columns: 1fr;
  }
  .filter-sidebar {
    position: static;
    margin-bottom: 20px;
  }
  .listing-detail-layout {
    grid-template-columns: 1fr;
  }
  .seller-card {
    position: static;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .dashboard-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  body {
    padding-bottom: 60px;
  }
  .header-search {
    display: none;
  }
  .mobile-nav-toggle {
    display: block;
  }
  .mobile-bottom-bar {
    display: flex;
  }
  .hero-title {
    font-size: 28px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
