/* ═══════════════════════════════════════════════════════════════════
   BIDPOTS USER UI UPGRADE v2.0
   Modern, responsive, user-friendly interface
   Layered ON TOP of existing styles — NO breaking changes
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Global Improvements ────────────────────────────────────────── */
body {
  background: #f0f2f5 !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }

a { transition: color 0.2s ease, background 0.2s ease; }

/* ─── Top Navigation Bar — handled by bidpots-navigation.css ─────── */

/* Nav bar hover — handled by navigation.css */

/* ─── Sidebar Navigation — DISABLED (now using top nav, see bidpots-navigation.css) ── */
/* Sidebar styles moved to navigation CSS - keeping page-wrapper override only */
/* Sidebar styles now handled by bidpots-navigation.css */

/* Profile image in sidebar */
.imgCircle {
  width: 64px !important;
  height: 64px !important;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.imgCircle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ─── Page Content Area — handled by bidpots-navigation.css ──────── */

/* ─── Ad Cards (Modern Look) ─────────────────────────────────────── */
.ads {
  background: #ffffff !important;
  border: none !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04) !important;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.ads:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.1), 0 4px 8px rgba(0,0,0,0.06) !important;
}

.ads h2 {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  font-size: 14px !important;
  font-weight: 600;
  padding: 8px 14px !important;
  letter-spacing: 0.3px;
}

.ads figure {
  height: 180px !important;
  overflow: hidden;
  position: relative;
}

.ads figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.ads:hover figure img {
  transform: scale(1.05);
}

.ads figcaption {
  padding: 12px 14px !important;
  font-size: 14px;
  color: #374151;
  line-height: 1.4;
}

.ad-cont {
  padding: 10px 14px !important;
}

.ad_ttl {
  font-size: 15px !important;
  font-weight: 600;
  color: #1f2937;
  font-style: normal !important;
}

.ad_Price {
  color: #059669 !important;
  font-size: 16px;
  font-weight: 700;
}

/* ─── Buttons (Consistent Style) ─────────────────────────────────── */
.btn {
  border-radius: 8px !important;
  font-weight: 600;
  font-size: 13px;
  padding: 8px 16px;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  text-transform: none;
}

.btn.btn-yellow,
.btn.btn-blackt {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

.btn.btn-yellow:hover,
.btn.btn-blackt:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.btn-primary {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
  color: #ffffff !important;
  transform: translateY(-1px);
}

.btn.btn-gary {
  background: #374151 !important;
  color: #ffffff !important;
  border-radius: 8px;
}

/* ─── Form Controls (User Friendly) ──────────────────────────────── */
.form-control {
  border: 1.5px solid #e5e7eb !important;
  border-radius: 8px !important;
  padding: 10px 14px !important;
  font-size: 14px;
  color: #374151;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  height: auto !important;
  min-height: 42px;
}

.form-control:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
  outline: none;
}

.form-control::placeholder {
  color: #9ca3af;
}

select.form-control {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  padding-right: 36px !important;
}

/* ─── Form Background Sections ───────────────────────────────────── */
.form-bg {
  background: #ffffff !important;
  border-radius: 16px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
  padding: 24px !important;
  margin: 16px 0 !important;
  border: 1px solid #f0f2f5;
}

.form-bg > h4 {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3) !important;
  font-size: 14px !important;
  font-weight: 600;
  padding: 10px 18px !important;
  top: -20px !important;
}

/* ─── Ad Detail Page ─────────────────────────────────────────────── */
.bg-article,
.bg-white {
  background: #ffffff !important;
  border-radius: 16px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
  border: 1px solid #f0f2f5;
}

/* ─── Ad List Items ──────────────────────────────────────────────── */
.ad-list {
  background: #ffffff !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
  margin: 12px 0 !important;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
  border: 1px solid #f0f2f5;
}

.ad-list:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
}

.ad-list aside h2 {
  color: #1f2937 !important;
  font-size: 16px !important;
  font-weight: 600;
}

.ad-list aside p {
  color: #6b7280 !important;
  line-height: 1.5;
}

.item_price {
  color: #059669 !important;
  font-size: 22px !important;
  font-weight: 800;
}

/* ─── Profile Section ────────────────────────────────────────────── */
.profile {
  width: auto !important;
  max-width: 300px;
}

.profile figure {
  border-radius: 50% !important;
  border: 4px solid #ffffff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  width: 120px;
  height: 120px;
  overflow: hidden;
}

.profile figure img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
}

/* ─── Bid Section ────────────────────────────────────────────────── */
.bid ul {
  padding: 12px !important;
  border-radius: 8px;
  background: #f9fafb;
}

.bid li {
  background: #ffffff !important;
  border-radius: 8px;
  margin-bottom: 8px;
  padding: 12px !important;
  border: 1px solid #f0f2f5;
  transition: background 0.15s ease;
}

.bid li:hover {
  background: #f0f9ff !important;
}

.bid li strong {
  color: #059669 !important;
  font-size: 22px !important;
}

.post-bid form {
  background: #f8fafc !important;
  border-radius: 12px;
  padding: 24px !important;
  border: 1px solid #e8ecf0;
}

/* ─── Comments ───────────────────────────────────────────────────── */
.comments li {
  background: #ffffff !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
  margin-bottom: 12px !important;
  padding: 16px !important;
  border: 1px solid #f0f2f5;
}

.user-comment input {
  border-radius: 12px !important;
  height: 48px !important;
  font-size: 14px !important;
  letter-spacing: normal !important;
  border: 1.5px solid #e5e7eb;
}

.user-comment input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.user-comment .btn {
  border-radius: 10px !important;
  padding: 10px 24px;
  font-weight: 600;
}

/* ─── People/Users Cards ─────────────────────────────────────────── */
.peoples-item {
  background: #ffffff !important;
  border: 1px solid #f0f2f5 !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.peoples-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
}

.profile-details > figure {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  padding: 20px 0 !important;
}

.profile-details > h4 {
  background: #1f2937 !important;
  font-size: 14px;
  font-weight: 600;
}

/* ─── Search Bar ─────────────────────────────────────────────────── */
.search-bg {
  background: #ffffff !important;
  padding: 16px 0 !important;
  margin-bottom: 24px !important;
  border-radius: 12px;
  border: 1px solid #f0f2f5;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.stylish-input-group .form-control {
  border-radius: 8px 0 0 8px !important;
  border: 1.5px solid #e5e7eb !important;
  min-height: 44px;
}

.stylish-input-group .input-group-addon {
  border-radius: 0 8px 8px 0 !important;
  border: 1.5px solid #e5e7eb !important;
  border-left: none !important;
}

/* ─── Home Categories Grid ───────────────────────────────────────── */
.home-cats {
  background: #ffffff !important;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  border: 1px solid #f0f2f5;
}

.home-cats .col-sm-4 {
  border-color: #f0f2f5 !important;
  padding: 24px !important;
  transition: all 0.2s ease;
}

.home-cats .col-sm-4:hover {
  background: #f8fafc;
  box-shadow: none !important;
}

.home-cats figcaption {
  font-size: 14px !important;
  font-weight: 600;
  color: #374151;
}

/* ─── Post Ad FAB Button ─────────────────────────────────────────── */
.postAd {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  background-image: none !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4) !important;
  color: #ffffff !important;
  font-size: 13px !important;
  font-weight: 600;
  height: 56px !important;
  width: auto !important;
  padding: 0 20px !important;
  padding-top: 0 !important;
  display: flex !important;
  align-items: center;
  gap: 8px;
  text-shadow: none !important;
  bottom: 24px !important;
  right: 24px !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.postAd:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.5) !important;
  color: #ffffff !important;
}

.postAd i {
  display: inline !important;
  margin-right: 4px;
}

/* ─── Chat Panel ─────────────────────────────────────────────────── */
div#messages {
  background: #ffffff !important;
  border-radius: 12px 0 0 0;
  box-shadow: -4px 0 24px rgba(0,0,0,0.1);
  top: 64px !important;
  width: 340px !important;
}

div#messages .product-item {
  background: #f8fafc !important;
  border-radius: 8px;
  margin: 8px !important;
  padding: 8px !important;
}

/* ─── Portlets (Info Boxes) ──────────────────────────────────────── */
.portlet {
  border-radius: 12px !important;
  overflow: hidden;
  border: 1px solid #f0f2f5 !important;
}

.portlet-green > .portlet-heading,
.portlet-green {
  border-color: #f59e0b !important;
}

.portlet-green > .portlet-heading {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  border-radius: 12px 12px 0 0 !important;
}

/* ─── Footer ─────────────────────────────────────────────────────── */
footer {
  background: #111827 !important;
  border-radius: 16px 16px 0 0;
  padding: 24px !important;
  margin-top: 32px;
}

.f_menu a {
  color: #f59e0b !important;
  font-size: 13px;
  font-weight: 500;
}

.copyright {
  color: #9ca3af !important;
  font-size: 12px;
}

/* ─── Alerts & Messages ──────────────────────────────────────────── */
.alert {
  border-radius: 10px !important;
  border: none !important;
  padding: 14px 18px !important;
  font-size: 14px;
  font-weight: 500;
}

.alert-success {
  background: #d1fae5 !important;
  color: #065f46 !important;
}

.alert-danger {
  background: #fee2e2 !important;
  color: #991b1b !important;
}

.alert-info {
  background: #dbeafe !important;
  color: #1e40af !important;
}

/* ─── Login Page ─────────────────────────────────────────────────── */
.login-page {
  background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #faf5ff 100%) !important;
  background-image: none !important;
}

.login-page::before {
  display: none !important;
}

.login-page .portlet {
  background: #ffffff !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06) !important;
  border: 1px solid #f0f2f5 !important;
  max-width: 420px;
  margin: 40px auto !important;
}

/* ─── Star Rating ────────────────────────────────────────────────── */
.star .glyphicon,
.starr-view .glyphicon {
  font-size: 24px !important;
  margin: 0 2px !important;
  transition: transform 0.15s ease;
}

.star .glyphicon:hover {
  transform: scale(1.2);
}

/* ─── Headings ───────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', sans-serif !important;
  font-weight: 700 !important;
  color: #1f2937;
}

.ttl {
  font-size: 24px !important;
  font-weight: 800 !important;
  color: #1f2937;
}

/* ─── Sidebar Accordion — REMOVED (no sidebar) ──────────────────── */

/* ─── Badge ──────────────────────────────────────────────────────── */
.badge.green, .badge {
  background: #059669 !important;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 10px;
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE — Mobile First (Easy Menu Operations)
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 991px) {
  /* Navigation handled by bidpots-navigation.css */
}

@media (max-width: 767px) {
  /* Top Bar */
  .navbar-brand img {
    height: 30px !important;
    max-width: 120px !important;
  }

  /* Ad Cards Mobile - 2 column grid */
  .ads-sec > .row > [class*="col-xs-6"] {
    padding: 6px !important;
  }

  .ads figure {
    height: 140px !important;
  }

  .ads figcaption {
    font-size: 12px !important;
    padding: 8px 10px !important;
  }

  .ad_ttl {
    font-size: 13px !important;
    width: 100% !important;
  }

  .ad_Price {
    font-size: 14px !important;
    text-align: left !important;
  }

  /* Forms Mobile */
  .form-bg {
    padding: 16px !important;
    margin: 8px 0 !important;
    border-radius: 12px !important;
  }

  .form-control {
    font-size: 16px !important; /* prevents iOS zoom */
    min-height: 48px !important;
  }

  /* Buttons Mobile - larger touch targets */
  .btn {
    min-height: 44px;
    padding: 10px 16px !important;
    font-size: 14px !important;
  }

  /* Chat - full width on mobile */
  div#messages {
    width: 100% !important;
    border-radius: 0 !important;
  }

  /* Ad List Mobile */
  .ad-list {
    margin: 8px 0 !important;
  }

  .ad-list figure {
    height: 120px;
  }

  .item_price {
    font-size: 18px !important;
  }

  /* Profile mobile */
  .profile figure {
    width: 80px;
    height: 80px;
  }

  /* Bid section mobile */
  .bid li strong {
    font-size: 18px !important;
  }

  /* Comments mobile */
  .comments li {
    border-radius: 12px !important;
    padding: 12px !important;
  }

  /* Footer mobile */
  footer {
    border-radius: 0 !important;
    margin-left: -12px !important;
    margin-right: -12px !important;
  }

  /* Search */
  .search-bg {
    border-radius: 0 !important;
    margin-left: -12px !important;
    margin-right: -12px !important;
    padding: 12px !important;
  }
}

/* ─── Extra Small Screens (< 400px) ──────────────────────────────── */
@media (max-width: 399px) {
  .ads-sec > .row > [class*="col-xs-6"] {
    width: 100% !important;
  }

  .navbar-brand img {
    height: 24px !important;
    max-width: 100px !important;
  }
}

/* ═══ Dark mode removed per user request ═══ */

/* ═══════════════════════════════════════════════════════════════════
   ACCESSIBILITY (WCAG 2.1 AA)
   ═══════════════════════════════════════════════════════════════════ */

/* Focus indicators */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #2563eb !important;
  outline-offset: 2px !important;
  box-shadow: none !important;
}

/* Minimum touch target size (44x44px) */
.navbar-side .navbar-nav > li > a {
  min-height: 44px;
  display: flex;
  align-items: center;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .ads:hover { transform: none; }
  .peoples-item:hover { transform: none; }
  .postAd:hover { transform: none; }
}

/* ═══════════════════════════════════════════════════════════════════
   ALERTS, VALIDATION & ERROR MESSAGES (Project-wide)
   Rich UI with icons, animations, proper direction
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Custom Alert Boxes ─────────────────────────────────────────── */
.bp-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 16px;
  animation: bpAlertIn 0.3s ease-out;
}

.bp-alert i {
  font-size: 16px;
  margin-top: 1px;
  flex-shrink: 0;
}

.bp-alert-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.bp-alert-error i { color: #dc2626; }

.bp-alert-success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.bp-alert-success i { color: #16a34a; }

.bp-alert-warning {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.bp-alert-warning i { color: #d97706; }

.bp-alert-info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.bp-alert-info i { color: #2563eb; }

@keyframes bpAlertIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── ASP.NET Validation Messages ────────────────────────────────── */
span[id*="Validator"],
span[id*="validator"],
span[style*="color:Red"],
span[style*="color: Red"] {
  display: block !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  color: #dc2626 !important;
  margin-top: 4px;
  padding: 4px 8px;
  background: #fef2f2;
  border-radius: 6px;
  border-left: 3px solid #dc2626;
  animation: bpAlertIn 0.2s ease-out;
}

/* ─── Form Labels (consistent) ───────────────────────────────────── */
label, .control-label {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #374151 !important;
  margin-bottom: 6px !important;
}

/* ─── Error state for form controls ──────────────────────────────── */
.form-control.input-validation-error,
.form-control:invalid {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220,38,38,0.08) !important;
}

/* ─── Success Feedback ───────────────────────────────────────────── */
.alert-success,
.text-success,
div[style*="color:Green"],
div[style*="color: Green"] {
  background: #f0fdf4 !important;
  color: #166534 !important;
  border: 1px solid #bbf7d0 !important;
  border-radius: 10px !important;
  padding: 14px 18px !important;
  font-weight: 500 !important;
}

.alert-danger,
.text-danger {
  background: #fef2f2 !important;
  color: #991b1b !important;
  border: 1px solid #fecaca !important;
  border-radius: 10px !important;
  padding: 14px 18px !important;
  font-weight: 500 !important;
}

/* ─── Login Page Specific ────────────────────────────────────────── */
.login-page {
  background: linear-gradient(135deg, #f8f9fb 0%, #eef1f6 50%, #e8ecf4 100%) !important;
  background-image: none !important;
  min-height: 100vh;
}

.login-page::before { display: none !important; }

/* ─── Loading States ─────────────────────────────────────────────── */
.btn[disabled],
.btn.loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}

/* ─── Tooltips for validation ────────────────────────────────────── */
.form-group {
  position: relative;
}

/* ─── Page-wide transition smoothing ─────────────────────────────── */
.form-control,
.btn,
a,
.ads,
.ad-list,
.peoples-item {
  transition: all 0.2s ease !important;
}

/* ═══════════════════════════════════════════════════════════════════
   MY ADS PAGE — Rich card layout with actions
   ═══════════════════════════════════════════════════════════════════ */
.ad-list .row > a.col-sm-9 {
  background: #ffffff !important;
  padding: 16px !important;
  transition: background 0.2s;
}

.ad-list .row > a.col-sm-9:hover {
  background: #fafbfc !important;
}

.ad-list figure {
  border-radius: 8px;
  overflow: hidden;
  height: 130px !important;
}

.ad-list figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.ad-list .col-sm-3 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px !important;
  gap: 8px;
}

.product_status {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.product_status .btn {
  min-width: 100px;
  font-size: 12px !important;
  padding: 6px 12px !important;
}

.link_green {
  color: #16a34a !important;
  font-weight: 600;
  font-size: 12px;
  background: #f0fdf4;
  padding: 3px 10px;
  border-radius: 12px;
}

.link_red {
  color: #dc2626 !important;
  font-weight: 600;
  font-size: 12px;
  background: #fef2f2;
  padding: 3px 10px;
  border-radius: 12px;
}

/* No ads empty state */
#adsErrMsg .alert {
  border-radius: 12px !important;
  padding: 40px 20px !important;
  font-size: 15px;
}

/* ═══════════════════════════════════════════════════════════════════
   FILTER / SEARCH PAGE
   ═══════════════════════════════════════════════════════════════════ */
.filter .portlet {
  border-radius: 12px !important;
  overflow: hidden;
}

.filter .portlet .portlet-heading {
  border-radius: 12px 12px 0 0 !important;
}

.side-bar {
  background: #ffffff !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
  padding: 16px !important;
  border: 1px solid #f0f2f5;
}

.side-bar .portlet {
  margin-bottom: 12px !important;
}

.top-bar-filter {
  margin-bottom: 16px;
}

/* ═══════════════════════════════════════════════════════════════════
   TERMS & CONDITIONS / ABOUT / STATIC PAGES
   ═══════════════════════════════════════════════════════════════════ */
.terms-content,
.about-content,
.page-content > .container,
.page-content > .row {
  max-width: 900px;
  margin: 0 auto;
}

.page-content h2,
.page-content h3 {
  color: #1a1a2e !important;
  margin-top: 24px;
  margin-bottom: 12px;
}

.page-content p {
  color: #4b5563;
  line-height: 1.8;
  font-size: 14px;
}

.page-content ul, .page-content ol {
  color: #4b5563;
  line-height: 1.8;
  padding-left: 24px;
}

/* ═══════════════════════════════════════════════════════════════════
   ADS SECTION — Consistent grid spacing
   ═══════════════════════════════════════════════════════════════════ */
.ads-sec {
  margin: 0 -8px;
}

.ads-sec > .row > [class*="col-"] {
  padding: 8px !important;
}

.ads-sec .col-sm-12 > h2,
.ttl {
  font-size: 20px !important;
  font-weight: 700 !important;
  color: #1a1a2e !important;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #f0f2f5;
}

/* ═══════════════════════════════════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════════════════════════════════ */
.pagination > li > a,
.pagination > li > span {
  border-radius: 8px !important;
  margin: 0 2px;
  border: 1px solid #e5e7eb;
  color: #374151;
  font-size: 13px;
  padding: 8px 14px;
}

.pagination > li.active > a {
  background: #0f3460 !important;
  border-color: #0f3460 !important;
  color: #fff !important;
}

.pagination > li > a:hover {
  background: #f3f4f6 !important;
  color: #0f3460 !important;
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE FIXES FOR MY ADS + FILTERS
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
  .ad-list .row > a.col-sm-9,
  .ad-list .col-sm-3 {
    width: 100% !important;
    float: none !important;
  }

  .ad-list figure {
    height: 180px !important;
    margin-bottom: 12px;
  }

  .ad-list .col-sm-3 {
    flex-direction: row;
    justify-content: space-between;
    padding: 12px 16px !important;
    border-top: 1px solid #f0f2f5;
  }

  .side-bar {
    margin-bottom: 16px;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   BACKGROUND PATTERNS & GRADIENTS (CSS-only, no external images)
   Zero performance impact — pure CSS, no HTTP requests
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Login & Register Page Background ───────────────────────────── */
.login-page {
  background: 
    radial-gradient(ellipse at 20% 50%, rgba(15,52,96,0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(233,69,96,0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(15,52,96,0.03) 0%, transparent 50%),
    linear-gradient(180deg, #f8f9fb 0%, #eef1f6 50%, #e8ecf4 100%) !important;
  background-image: none !important;
  min-height: 100vh;
}

/* ─── Main Page Background ───────────────────────────────────────── */
#page-wrapper {
  background: 
    radial-gradient(ellipse at 0% 0%, rgba(15,52,96,0.02) 0%, transparent 40%),
    radial-gradient(ellipse at 100% 100%, rgba(233,69,96,0.015) 0%, transparent 40%),
    #f5f7fa !important;
}

/* ─── Home Page Hero/Banner Section ──────────────────────────────── */
.banner,
.search-bg {
  background: 
    linear-gradient(135deg, rgba(15,52,96,0.95) 0%, rgba(26,26,46,0.9) 100%),
    repeating-linear-gradient(45deg, transparent, transparent 20px, rgba(255,255,255,0.02) 20px, rgba(255,255,255,0.02) 40px) !important;
  position: relative;
}

/* ─── Card Decorative Gradient (hover state) ─────────────────────── */
.ads::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0f3460, #e94560, #0f3460);
  border-radius: 12px 12px 0 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ads:hover::before {
  opacity: 1;
}

/* ─── Profile Page Header ────────────────────────────────────────── */
.profile-details > figure {
  background: 
    linear-gradient(135deg, #0f3460 0%, #1a1a2e 50%, #16213e 100%),
    repeating-linear-gradient(120deg, transparent, transparent 30px, rgba(255,255,255,0.03) 30px, rgba(255,255,255,0.03) 60px) !important;
}

/* ─── Footer Gradient ────────────────────────────────────────────── */
footer {
  background: 
    linear-gradient(135deg, #0a0a1a 0%, #111827 50%, #1a1a2e 100%) !important;
}

/* ═══════════════════════════════════════════════════════════════════
   PERFORMANCE OPTIMIZATIONS
   ═══════════════════════════════════════════════════════════════════ */

/* GPU acceleration for animated elements */
.ads, .ad-list, .peoples-item, .bp-fab-post, .btn {
  will-change: transform;
  transform: translateZ(0);
}

/* Lazy-load images - content-visibility for off-screen elements */
.ads-sec .ads:nth-child(n+9) {
  content-visibility: auto;
  contain-intrinsic-size: 0 320px;
}

/* Optimize font rendering */
body {
  text-rendering: optimizeSpeed !important;
}

h1, h2, h3, h4, .ttl, .bp-h1, .bp-h2, .bp-h3 {
  text-rendering: optimizeLegibility;
}

/* Prevent layout shifts for images */
.ads figure img,
.ad-list figure img,
img[src*="cloudinary"],
img[src*="cloud_attachment"] {
  aspect-ratio: 4/3;
  object-fit: cover;
  background: #f0f2f5;
}

/* ═══════════════════════════════════════════════════════════════════
   SECURITY ENHANCEMENTS (CSS-level)
   ═══════════════════════════════════════════════════════════════════ */

/* Prevent text selection on sensitive UI elements */
.bp-nav-avatar, .bp-admin-link, .logout_open {
  -webkit-user-select: none;
  user-select: none;
}

/* Hide autocomplete styling for password fields */
input[type="password"]:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 30px #fff inset !important;
  -webkit-text-fill-color: #333 !important;
}

/* Prevent form resubmission indicators */
.btn:active {
  transform: scale(0.97);
}

/* ═══════════════════════════════════════════════════════════════════
   QUALITY & POLISH
   ═══════════════════════════════════════════════════════════════════ */

/* Smooth scrolling site-wide */
html {
  scroll-behavior: smooth;
}

/* Better text contrast and readability */
body {
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}

/* Consistent focus ring for accessibility */
:focus-visible {
  outline: 2px solid #0f3460 !important;
  outline-offset: 2px;
}

/* Print optimization */
@media print {
  .navbar-top, .bp-mobile-nav, .bp-fab-post, .bp-mobile-menu, footer {
    display: none !important;
  }
  #page-wrapper {
    margin: 0 !important;
    padding: 0 !important;
  }
  .ads, .ad-list {
    break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #ddd !important;
  }
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   GLOBAL ALIGNMENT & SPACING SYSTEM
   Perfect alignment across the entire web application
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Base Row/Column Reset ──────────────────────────────────────── */
.row {
  margin-left: -8px !important;
  margin-right: -8px !important;
}

.row > [class*="col-"] {
  padding-left: 8px !important;
  padding-right: 8px !important;
}

/* ─── Page Content Container ─────────────────────────────────────── */
.page-content {
  min-height: 60vh;
}

/* ═══════════════════════════════════════════════════════════════════
   FILTER PAGE (filterads.aspx) — Proper Layout
   ═══════════════════════════════════════════════════════════════════ */

/* Filter Sidebar */
.filter.side-bar {
  position: sticky;
  top: 116px;
  padding: 0 !important;
  border-radius: 12px !important;
  overflow: hidden;
  border: 1px solid #e8ecf0 !important;
  background: #ffffff !important;
}

.filter .portlet {
  border: none !important;
  border-radius: 0 !important;
  margin-bottom: 0 !important;
  border-bottom: 1px solid #f0f2f5 !important;
}

.filter .portlet:last-child {
  border-bottom: none !important;
}

.filter .portlet-heading {
  background: #fafbfc !important;
  padding: 12px 16px !important;
  border-radius: 0 !important;
  border-bottom: 1px solid #f0f2f5;
}

.filter .portlet-heading h4 {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #1a1a2e !important;
  margin: 0 !important;
}

.filter .portlet-body {
  padding: 14px 16px !important;
  height: auto !important;
  max-height: 300px;
  overflow-y: auto;
}

.filter .portlet-body .form-group {
  margin-bottom: 12px !important;
}

.filter .portlet-body .form-group:last-child {
  margin-bottom: 0 !important;
}

.filter .portlet-body label {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #555 !important;
  margin-bottom: 4px !important;
}

.filter .portlet-body .form-control {
  min-height: 36px !important;
  font-size: 13px !important;
  padding: 6px 10px !important;
}

/* Filter Dynamic Fields */
#dynamic_fields1 {
  padding: 12px 16px;
}

#dynamic_fields1 .form-group {
  margin-bottom: 12px !important;
}

#dynamic_fields1 .form-group label {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #555 !important;
}

/* Search & Clear Buttons */
.filter + br + .row,
.side-bar .row {
  padding: 12px 16px !important;
  margin: 0 !important;
}

.filter ~ .row .btn-warning,
#btnSearch {
  background: linear-gradient(135deg, #0f3460, #1a1a2e) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 9px 20px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}

.itemClear {
  background: #f3f4f6 !important;
  color: #374151 !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 8px !important;
  padding: 9px 20px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}

.itemClear:hover {
  background: #e5e7eb !important;
}

/* ─── Search Bar in Filter Page ──────────────────────────────────── */
.top-bar-filter {
  margin-bottom: 20px !important;
}

.top-bar-filter .search-bg {
  background: #ffffff !important;
  border-radius: 12px !important;
  padding: 16px !important;
  margin: 0 !important;
  border: 1px solid #e8ecf0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.top-bar-filter .search-bg > [class*="col-"] {
  padding: 0 !important;
  float: none !important;
  width: auto !important;
  flex: 1;
  min-width: 200px;
}

.searched-items {
  padding: 8px 0 0 !important;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.searched-items .btn-info {
  background: #eef2ff !important;
  color: #3730a3 !important;
  border: 1px solid #c7d2fe !important;
  border-radius: 16px !important;
  font-size: 12px !important;
  padding: 4px 10px !important;
}

/* ═══════════════════════════════════════════════════════════════════
   GLOBAL ALIGNMENT FIXES
   ═══════════════════════════════════════════════════════════════════ */

/* Consistent card spacing */
.form-bg,
.bg-white,
.bg-article {
  margin-bottom: 20px !important;
}

/* Form field consistent spacing */
.form-group {
  margin-bottom: 16px !important;
}

/* Headings alignment */
h2, h3, h4 {
  margin-top: 0 !important;
}

/* Button group alignment */
.btn + .btn {
  margin-left: 8px;
}

/* Text alignment for prices */
.item_price {
  margin-top: 12px !important;
  margin-bottom: 8px !important;
}

/* ─── Ad Details Page Alignment ──────────────────────────────────── */
.ad1 .col-xs-12 > .row {
  margin: 0 !important;
  padding: 10px 16px !important;
  border-radius: 6px;
}

.ad1 .col-xs-12 > .row:nth-child(2n) {
  background: #f8f9fa !important;
}

/* ─── Profile Page Alignment ─────────────────────────────────────── */
.profile {
  padding: 20px !important;
}

.status-user {
  position: static !important;
  float: none !important;
  text-align: center;
  margin-top: 12px;
}

/* ─── People Cards Alignment ─────────────────────────────────────── */
.peoples-item {
  margin: 8px 0 !important;
  text-align: center;
  padding: 16px !important;
}

.peoples-item .btn {
  margin: 4px 2px !important;
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE ALIGNMENT
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 991px) {
  /* Filter sidebar goes above content on tablet */
  .col-sm-3:has(.side-bar),
  .col-sm-3:has(.filter) {
    width: 100% !important;
    margin-bottom: 16px;
  }

  .col-sm-9 {
    width: 100% !important;
  }

  .filter.side-bar {
    position: static;
  }

  /* Collapse filter on mobile — show as horizontal */
  .filter .portlet-body {
    max-height: 200px;
  }
}

@media (max-width: 767px) {
  /* Global spacing */
  .row {
    margin-left: -6px !important;
    margin-right: -6px !important;
  }

  .row > [class*="col-"] {
    padding-left: 6px !important;
    padding-right: 6px !important;
  }

  /* Filter page */
  .top-bar-filter .search-bg {
    flex-direction: column;
    gap: 10px;
  }

  .top-bar-filter .search-bg > [class*="col-"] {
    width: 100% !important;
    min-width: 100%;
  }

  /* Forms on mobile */
  .form-bg {
    padding: 16px !important;
  }

  /* Ad detail alignment */
  .ad1 .col-xs-12 > .row {
    padding: 8px 12px !important;
  }

  /* Profile alignment */
  .top-ttls {
    position: static !important;
    padding: 16px !important;
    text-align: center !important;
  }

  .top-ttls h4 {
    font-size: 24px !important;
  }

  /* People grid */
  .peoples-item {
    margin: 6px 0 !important;
  }

  /* Buttons full width on mobile */
  .form-bg .btn,
  .post-bid .btn {
    width: 100%;
    margin: 4px 0 !important;
  }

  .btn + .btn {
    margin-left: 0 !important;
  }
}

@media (max-width: 480px) {
  /* Extra small — single column everything */
  .col-xs-6 {
    width: 100% !important;
  }

  .ad-cont {
    padding: 8px !important;
  }

  .ads h2 {
    font-size: 12px !important;
    padding: 6px 10px !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   CONTENT VISIBILITY & OVERFLOW FIXES
   Ensure nothing is hidden, all content properly visible
   ═══════════════════════════════════════════════════════════════════ */

/* Prevent content from being clipped */
#page-wrapper,
.page-content,
#wrapper {
  overflow: visible !important;
}

/* Ensure body content flows properly */
body {
  overflow-x: hidden;
  overflow-y: auto;
}

/* Fix collapsed content sections */
#page-wrapper.collapsed {
  border: none !important;
  margin-left: 0 !important;
}

/* Ensure all main content is visible */
.page-content > .row,
.page-content > div {
  display: block;
}

/* Fix hidden divs that shouldn't be hidden */
.form-bg,
.bg-white,
.bg-article,
.ad-list,
.ads-sec {
  visibility: visible !important;
  opacity: 1 !important;
}

/* ─── Hide ASP.NET inline validators (validation on submit only) ── */
span[id*="rfv"],
span[id*="rev"],
span[id*="Validator"]:not(.field-validation-error) {
  display: none !important;
}

/* Only show when ValidationGroup is triggered and page is invalid */
.aspNetHidden + span[style*="color:Red"],
.aspNetHidden + span[style*="color: Red"] {
  display: none !important;
}

/* ─── Placeholders — Enhanced ────────────────────────────────────── */
.form-control::placeholder {
  color: #9ca3af !important;
  font-weight: 400;
  font-size: 13px;
}

.form-control::-webkit-input-placeholder { color: #9ca3af; }
.form-control::-moz-placeholder { color: #9ca3af; opacity: 1; }

/* ─── Content body — no hiding, full display ─────────────────────── */
.portlet-body {
  display: block !important;
  visibility: visible !important;
}

.panel-collapse.collapse.in,
.panel-collapse.in {
  display: block !important;
  height: auto !important;
}

/* ─── Proper spacing between major sections ──────────────────────── */
.ads-sec {
  margin-top: 0 !important;
  margin-bottom: 24px;
}

.ads-sec > h2,
.ads-sec > .ttl {
  margin-bottom: 16px !important;
  padding: 0 8px;
}

/* ─── Fix for content pushed off screen ──────────────────────────── */
@media (min-width: 992px) {
  #page-wrapper {
    width: 100% !important;
    max-width: 1400px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}
