/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #5F6368;
  background-color: #FFFFFF;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header Styles */
.main-header {
  background: #FFFFFF;
  color: #2B2F33;
  padding: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid #E8FBF4;
  max-height: 100px;
  overflow: visible;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.25rem 1.5rem;
  padding-left: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  height: 100px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
  margin-right: auto;
  margin-left: -2rem;
  padding-left: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  justify-content: flex-end;
}

/* Place Ad button in header-right - matches Vinted/Leboncoin pattern */
.header-right .btn-place-ad {
  margin-top: 0;
  margin-left: 0.5rem;
  order: 1;
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  height: 100px;
  padding: 0;
  margin: 0;
}

.logo-link {
  display: inline-block;
  text-decoration: none;
  line-height: 0;
  padding: 0;
  margin: 0;
}

.logo-image {
  height: 100px;
  width: auto;
  display: block;
  transition: opacity 0.3s ease;
  margin: 0;
}

.logo-image:hover {
  opacity: 0.9;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2B2F33;
  text-decoration: none;
  letter-spacing: -0.5px;
}

.main-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex: 1;
  justify-content: center;
  height: 100%;
}

/* Hamburger Menu Button */
.hamburger-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
  position: relative;
}

.hamburger-line {
  width: 100%;
  height: 3px;
  background-color: #2B2F33;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger-menu-btn:hover .hamburger-line {
  background-color: #4FD1A5;
}

.hamburger-menu-btn:active .hamburger-line,
.hamburger-menu-btn:focus .hamburger-line {
  background-color: #2B2F33;
}

/* Hide hamburger button when menu is open */
.mobile-menu.open~.header-container .hamburger-menu-btn,
body:has(.mobile-menu.open) .hamburger-menu-btn {
  opacity: 0;
  pointer-events: none;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

/* On desktop, completely hide mobile menu elements */
@media (min-width: 769px) {

  .mobile-menu,
  .mobile-menu-overlay {
    display: none !important;
    pointer-events: none !important;
    visibility: hidden !important;
  }
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  max-width: 85vw;
  height: 100vh;
  background: #FFFFFF;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: right 0.3s ease;
  overflow-y: auto;
  pointer-events: none;
}

.mobile-menu.open {
  right: 0;
  pointer-events: auto;
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #E0E0E0;
  background: #F7F9FB;
  position: sticky;
  top: 0;
  z-index: 1;
}

.mobile-menu-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #2B2F33;
  margin: 0;
}

.mobile-menu-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: #5F6368;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: color 0.3s;
}

.mobile-menu-close:hover {
  color: #2B2F33;
}

.mobile-menu-close:active,
.mobile-menu-close:focus {
  color: #5F6368;
  outline: none;
}

.mobile-menu-content {
  padding: 0;
}
.mobile-menu-content a {
  text-decoration: none;
}
.mobile-menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  color: #2B2F33;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  border-bottom: 1px solid #F0F0F0;
  transition: background-color 0.2s, color 0.2s;
  width: 100%;
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  text-align: left;
  cursor: pointer;
}

.mobile-menu-item:hover,
.mobile-menu-item:active {
  background-color: #F7F9FB;
  color: #4FD1A5;
}

.mobile-menu-item svg {
  flex-shrink: 0;
  color: currentColor;
}

.mobile-menu-item span {
  flex: 1;
}

.mobile-menu-badge {
  background-color: #EF4444;
  color: white;
  border-radius: 12px;
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

.mobile-menu-toggle {
  justify-content: space-between;
}

.mobile-menu-arrow {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.mobile-menu-toggle.open .mobile-menu-arrow {
  transform: rotate(180deg);
}

.mobile-menu-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background-color: #F7F9FB;
}

.mobile-menu-submenu.open {
  max-height: 1000px;
}

.mobile-menu-subitem {
  display: block;
  padding: 0.75rem 1.5rem 0.75rem 3rem;
  text-decoration: none;
  color: inherit;
}
.mobile-menu-subitem:focus {
  text-decoration: none;
}
.mobile-menu-subitem-category {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.mobile-menu-subitem-icon {
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
}

.mobile-menu-subitem:hover {
  background-color: #E8FBF4;
  color: #4FD1A5;
  text-decoration: none;
}

.mobile-menu-divider {
  border: none;
  border-top: 1px solid #E0E0E0;
  margin: 0.5rem 0;
}

.mobile-menu-logout {
  color: #EF4444;
}

.mobile-menu-logout:hover {
  background-color: #FEF2F2;
  color: #DC2626;
}

.mobile-menu-primary {
  background-color: #4FD1A5;
  color: white !important;
  font-weight: 600;
  margin: 0.5rem 0;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  justify-content: center;
  font-size: 0.9375rem;
  border-bottom: none;
}

.mobile-menu-primary:hover {
  background-color: #4FD1A5 !important;
  color: white !important;
}

.mobile-menu-signup {
  background-color: #4FD1A5;
  color: white !important;
  font-weight: 600;
  margin-top: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  justify-content: center;
}

.mobile-menu-signup:hover {
  background-color: #4FD1A5 !important;
  color: white !important;
}

.mobile-menu-login-btn {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.nav-link {
  color: #2B2F33;
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  transition: color 0.3s;
  border-bottom: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  height: 100%;
  box-sizing: border-box;
}

/* Lower Sell button slightly - target the nav-link that comes after buy-dropdown */
.buy-dropdown+.nav-link {
  margin-top: 0.125rem;
}

.nav-link:hover {
  color: #4FD1A5;
  border-bottom-color: #4FD1A5;
}

.home-icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  margin-top: 0.125rem;
}

.home-icon {
  width: 20px;
  height: 20px;
  color: #2B2F33;
  transition: color 0.15s ease-out, transform 0.15s ease-out;
}

.home-icon-link:hover .home-icon {
  color: #4FD1A5;
  transform: translateY(-2px);
}

/* Header auth: single subtle Log in (Sign up is in modal only) */
.auth-buttons {
  display: inline-flex;
  align-items: center;
  margin-left: 0.5rem;
}

.btn-login-header {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.9rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #5F6368;
  background: transparent;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-login-header:hover {
  background: #f7f9fb;
  color: #2B2F33;
  border-color: #9ca3af;
}

/* Login modal */
.login-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.login-modal {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 400px;
  padding: 1.75rem;
  position: relative;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

.login-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
  font-size: 1.5rem;
  line-height: 1;
  color: #9ca3af;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.2s;
}

.login-modal-close:hover {
  color: #374151;
  background: #f3f4f6;
}

.login-modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 1.25rem 0;
  padding-right: 2rem;
}

.login-modal-alert {
  font-size: 0.875rem;
  color: #b91c1c;
  background: #fef2f2;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  border: 1px solid #fecaca;
}

.login-modal-form {
  margin-bottom: 1rem;
}

.login-modal-field {
  margin-bottom: 1rem;
}

.login-modal-field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.35rem;
}

.login-modal-field input {
  width: 100%;
  padding: 0.625rem 0.75rem;
  font-size: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.login-modal-field input:focus {
  outline: none;
  border-color: #9ca3af;
}

.login-modal-actions {
  margin-top: 1.25rem;
}

.login-modal-submit {
  width: 100%;
  padding: 0.625rem 1rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fff;
  background: #4FD1A5;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}

.login-modal-submit:hover {
  background: #4FD1A5;
}

.login-modal-signup {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
  text-align: center;
}

.login-modal-signup-link {
  color: #4FD1A5;
  font-weight: 500;
  text-decoration: none;
}

.login-modal-signup-link:hover {
  text-decoration: underline;
}

/* Messages Icon */
.messages-icon-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.5rem;
  color: #2B2F33;
  text-decoration: none;
  transition: color 0.3s;
  border-bottom: 2px solid transparent;
  height: 100%;
  box-sizing: border-box;
}

.messages-icon-link:hover {
  color: #4FD1A5;
  border-bottom-color: #4FD1A5;
}

.messages-icon {
  width: 20px;
  height: 20px;
  line-height: 1;
  flex-shrink: 0;
}

.messages-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background-color: #EF4444;
  color: white;
  border-radius: 9px;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
  border: 2px solid white;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  margin-top: -6px;
}

/* Floating Post Ad button - mobile only */
.floating-post-ad-btn {
  display: none;
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 900;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #4FD1A5;
  color: #fff;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2), 0 2px 6px rgba(79, 209, 165, 0.4);
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  animation: floating-post-ad-scale-in 0.35s ease-out;
}
.floating-post-ad-btn:hover {
  color: #fff;
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25), 0 3px 10px rgba(79, 209, 165, 0.45);
}
.floating-post-ad-label {
  display: none;
}
.floating-post-ad-icon {
  display: block;
}
@keyframes floating-post-ad-scale-in {
  0% { transform: scale(0.92); opacity: 0.9; }
  100% { transform: scale(1); opacity: 1; }
}
@media (max-width: 768px) {
  .floating-post-ad-btn {
    display: inline-flex;
  }
}
@media (min-width: 769px) {
  .floating-post-ad-btn {
    display: none !important;
  }
}

/* Global loading bar (Turbo navigation) */
.global-loading-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #e5e7eb;
  z-index: 9999;
  transform: scaleX(0);
  transform-origin: left;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.global-loading-bar.visible {
  opacity: 1;
  transform: scaleX(0);
  animation: global-loading-bar 1s ease-out forwards;
}
@keyframes global-loading-bar {
  0% { transform: scaleX(0); background: #e5e7eb; }
  70% { transform: scaleX(0.85); background: #4FD1A5; }
  100% { transform: scaleX(1); background: #4FD1A5; }
}

/* Skeleton loaders for listing cards */
.skeleton-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  aspect-ratio: 4/3;
}
.skeleton-card-image {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
}
.skeleton-card-body {
  padding: 0.75rem 1rem;
}
.skeleton-line {
  height: 0.875rem;
  border-radius: 4px;
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
  margin-bottom: 0.5rem;
}
.skeleton-line:last-child {
  margin-bottom: 0;
}
.skeleton-line.short {
  width: 40%;
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.listings-grid.loading .listing-card {
  min-height: 280px;
}

.btn-place-ad {
  background-color: #4FD1A5;
  color: #FFFFFF;
  text-decoration: none;
  border: none;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.3s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  min-width: 55px;
  max-width: 65px;
  padding: 0 0.5rem;
  box-sizing: border-box;
  line-height: 1.2;
  margin-top: 0;
  vertical-align: middle;
}

.btn-place-ad {
  transition: background-color 0.15s ease-out, transform 0.15s ease-out, box-shadow 0.15s ease-out;
}

.btn-place-ad:hover {
  background-color: #4FD1A5;
  color: #FFFFFF;
  text-decoration: none;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(79, 209, 165, 0.4);
}

/* Desktop: Place Ad uses search-button green (#4FD1A5) */
@media (min-width: 1024px) {
  .header-right .btn-place-ad {
    height: 32px;
    min-width: 80px;
    max-width: 90px;
    padding: 0 0.875rem;
    font-size: 0.8125rem;
    margin-top: 24px;
    margin-left: 1rem;
    border-radius: 4px;
    order: 1;
    line-height: 1.2;
    background-color: #4FD1A5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
  }

  .header-right .dropdown {
    order: 2;
  }
}

/* Dropdown Menu */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1.25rem;
  height: 40px;
  min-width: 100px;
  box-sizing: border-box;
  border-radius: 6px;
  transition: background-color 0.08s cubic-bezier(0.4, 0, 0.2, 1), color 0.08s cubic-bezier(0.4, 0, 0.2, 1);
  color: #2B2F33;
  white-space: nowrap;
  line-height: 1;
  margin-top: -0.5rem;
}

.dropdown-toggle:hover {
  background-color: #F7F9FB;
}

.header-avatar-container {
  display: flex;
  align-items: center;
}

.header-avatar,
.header-avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.header-avatar-placeholder {
  background-color: #D1FAE5;
  color: #4FD1A5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
}

.header-greeting {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #2B2F33;
}

.dropdown-arrow {
  font-size: 0.75rem;
  color: #2B2F33;
  margin-left: 0.25rem;
}

.dropdown-menu {
  display: block;
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  background: white;
  min-width: 200px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-radius: 6px;
  padding: 0.5rem 0;
  z-index: 1000;
  list-style: none;
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 0.08s cubic-bezier(0.4, 0, 0.2, 1), transform 0.08s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0.08s;
  pointer-events: none;
  visibility: hidden;
}

.dropdown.open .dropdown-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
  transition: opacity 0.08s cubic-bezier(0.4, 0, 0.2, 1), transform 0.08s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s;
}

.dropdown.open .dropdown-toggle {
  color: #4FD1A5;
}

.dropdown-item {
  display: block;
  padding: 0.75rem 1.5rem;
  color: #2B2F33;
  text-decoration: none;
  transition: background-color 0.08s cubic-bezier(0.4, 0, 0.2, 1), color 0.08s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-item:hover {
  background-color: #E8FBF4;
  color: #4FD1A5;
}

/* Buy dropdown specific styles */
.buy-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 100%;
  margin-top: 0.125rem;
}

.buy-dropdown .dropdown-toggle {
  position: relative;
  /* Match nav-link styling exactly - override general dropdown-toggle styles */
  color: #2B2F33;
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  transition: color 0.3s;
  border-bottom: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  height: 100%;
  box-sizing: border-box;
  /* Override general dropdown-toggle button styles */
  background: none;
  border: none;
  border-radius: 0;
  min-width: auto;
  margin-top: 0;
  white-space: normal;
}

.buy-dropdown .dropdown-toggle:hover {
  color: #4FD1A5;
  border-bottom-color: #4FD1A5;
  background: none;
}

.buy-dropdown.open .dropdown-toggle {
  color: #2B2F33;
  background: none;
  border-bottom: 2px solid transparent;
}

.buy-dropdown.open .dropdown-toggle:hover {
  color: #4FD1A5;
  border-bottom-color: #4FD1A5;
}

.buy-dropdown .dropdown-toggle::after {
  content: '';
  position: absolute;
  right: -0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform 0.2s ease;
  margin-left: 0.5rem;
}

.buy-dropdown.open .dropdown-toggle::after {
  transform: translateY(-50%) rotate(180deg);
}

.buy-dropdown-menu {
  left: 0;
  right: auto;
  min-width: 200px;
  max-width: 280px;
  max-height: 500px;
  overflow-y: auto;
  margin-top: 0.75rem;
  border: 1px solid #E0E0E0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.buy-dropdown-menu .dropdown-item {
  padding: 0.875rem 1.25rem;
  font-size: 0.9375rem;
}
.buy-dropdown-menu .dropdown-item-category {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.buy-dropdown-menu .dropdown-item-icon {
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
}

.buy-dropdown-menu .dropdown-item:first-child {
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
  font-weight: 600;
  color: #4FD1A5;
  background-color: #F0FDF4;
}

.buy-dropdown-menu .dropdown-item:last-child {
  border-bottom: none;
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
}

.buy-dropdown-menu .dropdown-item:hover {
  background-color: #E8FBF4;
  color: #4FD1A5;
}

.buy-dropdown-menu .dropdown-item:first-child:hover {
  background-color: #DCFCE7;
  color: #4FD1A5;
}

/* Scrollbar styling for dropdown */
.buy-dropdown-menu::-webkit-scrollbar {
  width: 6px;
}

.buy-dropdown-menu::-webkit-scrollbar-track {
  background: #F5F5F5;
  border-radius: 3px;
}

.buy-dropdown-menu::-webkit-scrollbar-thumb {
  background: #D0D0D0;
  border-radius: 3px;
}

.buy-dropdown-menu::-webkit-scrollbar-thumb:hover {
  background: #B0B0B0;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .buy-dropdown-menu {
    min-width: 180px;
    max-width: 240px;
    max-height: 400px;
  }

  .buy-dropdown-menu .dropdown-item {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }
}

/* Logout button should look like the other dropdown links */
.dropdown-logout-form {
  margin: 0;
}

.dropdown-logout-form .dropdown-logout-btn {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 0.75rem 1.5rem;
  color: #2B2F33;
  transition: background-color 0.08s cubic-bezier(0.4, 0, 0.2, 1), color 0.08s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  font: inherit;
}

.dropdown-logout-form .dropdown-logout-btn:hover {
  background-color: #E8FBF4;
  color: #4FD1A5;
}

.back-nav-btn {
  border: none;
  background: transparent;
  color: #2B2F33;
  font: inherit;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  margin-right: 0.5rem;
}

.back-nav-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* Mobile filters on All Listings page */
.mobile-filters-bar {
  display: none;
  margin-bottom: 1.5rem;
}

.mobile-filters-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-filters-row {
  display: flex;
  gap: 0.5rem;
}

.mobile-filter-select,
.mobile-filter-input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  font-size: 0.9rem;
}

.mobile-filter-button {
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: none;
  background: #4FD1A5;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 768px) {
  .mobile-filters-bar {
    display: block;
    margin-bottom: 1rem;
    margin-top: 0;
  }

  .mobile-filters-row {
    flex-direction: column;
  }
}

.dropdown-divider {
  height: 1px;
  margin: 0.5rem 0;
  background-color: #e0e0e0;
  border: none;
}

/* Main Content */
.main-content {
  flex: 1;
}

.container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.listings-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.listings-header {
  margin-bottom: 2rem;
}

.listings-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #2B2F33;
  margin-bottom: 0.5rem;
}

.listings-subtitle {
  font-size: 1rem;
  color: #5F6368;
  margin: 0;
}

/* Hero Section */
.hero-section {
  background: #F7F9FB;
  color: #2B2F33;
  padding: 4rem 0;
  text-align: center;
  position: relative;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hero-title {
  font-size: 3rem;
  margin-bottom: 1rem;
  font-weight: 700;
  color: #FFFFFF;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: #FFFFFF;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.auth-buttons-hero {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

.btn-hero {
  padding: 0.875rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s;
  display: inline-block;
}

.btn-login {
  background-color: transparent;
  color: #2B2F33;
  border: 2px solid #E0E0E0;
}

.btn-login:hover {
  background-color: #E8FBF4;
  border-color: #4FD1A5;
  color: #4FD1A5;
  transform: translateY(-2px);
}

.btn-signup-hero {
  background-color: #4FD1A5;
  color: white;
  border: 2px solid #4FD1A5;
}

.btn-signup-hero:hover {
  background-color: #4FD1A5;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79, 209, 165, 0.3);
}

.search-box {
  margin-top: 2rem;
}
.search-box-hero {
  margin-top: 2.5rem;
  width: 100%;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.search-box-hero .search-input-group-hero {
  max-width: 100%;
  padding: 1rem 1.25rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}
.search-box-hero .search-input-hero {
  padding: 1.25rem 1.5rem;
  font-size: 1.2rem;
  min-height: 56px;
}
.search-box-hero .search-button {
  padding: 1.25rem 2.5rem;
  font-size: 1.125rem;
}

/* Marketplace hero card (DoneDeal-style tabs + subcategories) */
.marketplace-hero .hero-content {
  max-width: 720px;
}
.marketplace-hero-title {
  font-size: 2rem;
  margin-bottom: 0.35rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}
.marketplace-hero-subtitle {
  font-size: 1rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
  margin: 0 0 1.5rem 0;
}
.marketplace-card {
  background: rgba(255, 255, 255, 0.97);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  padding: 1.5rem 1.75rem;
  text-align: left;
}
.marketplace-category-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}
.marketplace-category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  padding: 1.5rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1f2937;
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}
.marketplace-category-card:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
  transform: translateY(-2px);
}
.marketplace-category-card.active {
  background: #E8FBF4;
  border-color: #4FD1A5;
  color: #0d6b4a;
}
.marketplace-category-card-icon {
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
  line-height: 1;
}
.marketplace-category-card-icon--marketplace {
  filter: brightness(1.35) saturate(1.4);
  display: inline-block;
}
.marketplace-category-card-label {
  text-align: center;
}
.marketplace-search-wrap {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e5e7eb;
}
.marketplace-search-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.marketplace-search-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.marketplace-search-input-wrap {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 140px;
  position: relative;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.marketplace-search-input-wrap:focus-within {
  outline: none;
  border-color: #4FD1A5;
  box-shadow: 0 0 0 2px rgba(79, 209, 165, 0.2);
}
.marketplace-search-input-wrap .marketplace-search-icon {
  position: absolute;
  left: 0.875rem;
  pointer-events: none;
}
.marketplace-search-input-wrap .marketplace-search-input {
  padding: 0.875rem 1rem 0.875rem 2.75rem;
  border: none;
  background: transparent;
  font-size: 1rem;
}
.marketplace-search-input-wrap .marketplace-search-input:focus {
  box-shadow: none;
}
.marketplace-search-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #6b7280;
}
.marketplace-search-icon-svg {
  width: 1.25rem;
  height: 1.25rem;
}
.marketplace-search-row:focus-within .marketplace-search-icon {
  color: #4FD1A5;
}
.marketplace-search-input {
  flex: 1;
  min-width: 0;
  padding: 0.65rem 0.75rem;
  font-size: 0.9375rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
}
.marketplace-search-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}
.marketplace-location-select,
.marketplace-radius-select {
  padding: 0.875rem 0.75rem;
  font-size: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  min-width: 120px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.marketplace-search-button {
  width: 100%;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: #4FD1A5;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}
.marketplace-search-button:hover {
  background: #3db88a;
}

/* Subcategories below the card (DoneDeal-style) */
.marketplace-subcategories-section {
  padding: 2rem 0 3rem;
  background: #f9fafb;
  margin-top: -1rem;
}
.marketplace-subcategories-section .container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.marketplace-subcategories-panel {
  display: none;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.marketplace-subcategories-panel.active {
  display: flex;
}
.marketplace-subcategory-link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  font-size: 0.9375rem;
  color: #374151;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.marketplace-link-icon {
  margin-right: 0.35rem;
}
.marketplace-subcategory-link:hover {
  background: #f3f4f6;
  color: #1d4ed8;
  border-color: #93c5fd;
}

/* Browse panels (Cars, Marketplace, Farming): full-width section blocks, portal layout */
.marketplace-subcategories-panel {
  display: none;
}
.marketplace-subcategories-panel.active {
  display: block;
  padding-top: 0;
}
.farming-section-block {
  width: 100%;
  padding: 1.25rem 0;
}
.farming-section-block--motors { background: rgba(239, 246, 255, 0.5); }
.farming-section-block--marketplace { background: rgba(224, 231, 255, 0.5); }
.farming-section-block:nth-of-type(1) { background: rgba(239, 246, 255, 0.5); }
.farming-section-block:nth-of-type(2) { background: rgba(240, 253, 244, 0.5); }
.farming-section-block:nth-of-type(3) { background: rgba(255, 251, 235, 0.5); }
.farming-section-block:nth-of-type(4) { background: rgba(243, 232, 255, 0.4); }
.farming-section-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
/* Motors: 3 grouped sections with reduced vertical spacing */
.motors-sections-inner {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.motors-category-section {
  margin-bottom: 1.75rem;
}
.motors-category-section:last-child {
  margin-bottom: 0;
}
/* Section header: large icon + uppercase title + optional subtitle */
.motors-section-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.motors-section-header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  flex-shrink: 0;
  color: #3b82f6;
}
.motors-section-icon,
.motors-section-header svg {
  width: 2rem;
  height: 2rem;
}
.motors-section-emoji {
  font-size: 2rem;
  line-height: 1;
}
.motors-section-header-text {
  min-width: 0;
}
.motors-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #374151;
  margin: 0 0 0.15rem 0;
  padding: 0;
}
.motors-section-subtitle {
  font-size: 0.8125rem;
  color: #6b7280;
  margin: 0;
  padding: 0;
  font-weight: 400;
}
/* Category tiles: text-only, premium */
.motors-tiles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  align-items: stretch;
}
.motors-tiles-grid .motors-tile {
  min-height: 3.5rem;
}
@media (max-width: 1023px) {
  .motors-tiles-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .motors-tiles-grid { grid-template-columns: 1fr; }
}
.motors-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  color: #374151;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}
.motors-tile:hover {
  color: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
}
.farming-section-heading {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #4b5563;
  margin: 0 0 0.75rem 0;
  padding: 0;
}
.farming-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  align-items: stretch;
}
.farming-cards-grid--equal-height .farming-category-card {
  min-height: 6.5rem;
}
@media (max-width: 1023px) {
  .farming-cards-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .farming-cards-grid { grid-template-columns: 1fr; }
}
.farming-category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 1.5rem;
  background: #fff;
  border-radius: 1rem;
  border: 1px solid #f3f4f6;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  color: #374151;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: transform 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}
.farming-category-card:hover {
  color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}
/* Icon cards: more prominent (motors main categories) */
.farming-category-card--with-icon {
  box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.08), 0 2px 6px -2px rgba(0, 0, 0, 0.06);
}
.farming-category-card--with-icon:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 20px -4px rgba(0, 0, 0, 0.12), 0 6px 10px -4px rgba(0, 0, 0, 0.08);
}
/* Text-only cards: typography only, same size */
.farming-category-card--text-only {
  justify-content: center;
}
.farming-category-card--text-only .farming-card-label {
  font-weight: 600;
}
.farming-card-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 0.5rem;
  border-radius: 50%;
  transition: background 0.2s ease;
}
.farming-section-block--machinery .farming-card-icon-wrap { background: #dbeafe; }
.farming-section-block--livestock .farming-card-icon-wrap { background: #dcfce7; }
.farming-section-block--supplies-feed .farming-card-icon-wrap { background: #fef3c7; }
.farming-section-block--infrastructure .farming-card-icon-wrap { background: #ede9fe; }
.farming-section-block--motors .farming-card-icon-wrap { background: #dbeafe; }
.farming-section-block--marketplace .farming-card-icon-wrap { background: #e0e7ff; }
.farming-category-card:hover .farming-card-icon-wrap {
  background: #eff6ff;
}
.farming-card-icon,
.farming-category-card svg {
  width: 1.25rem;
  height: 1.25rem;
  color: #4b5563;
  flex-shrink: 0;
  transition: color 0.2s ease;
}
.farming-category-card:hover .farming-card-icon,
.farming-category-card:hover svg {
  color: #2563eb;
}
.farming-card-label {
  text-align: center;
  line-height: 1.35;
}

.farming-view-all-block {
  padding: 1rem 0 1.5rem;
  background: #f9fafb;
  text-align: center;
}
.farming-view-all-block .container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.farming-view-all-btn {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #3b82f6;
  background: transparent;
  border: 2px solid #3b82f6;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.farming-view-all-btn:hover {
  background: #3b82f6;
  color: #fff;
}

/* Mobile homepage: app-like, full-width, strong structure */
@media (max-width: 767px) {
  .marketplace-hero .hero-overlay {
    background: rgba(0, 0, 0, 0.62);
  }
  .marketplace-hero.hero-section {
    padding-top: 1.25rem;
    padding-bottom: 1.5rem;
  }
  .marketplace-hero .hero-content {
    padding: 0.875rem 1rem;
    max-width: 100%;
  }
  .marketplace-hero-title {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 0.2rem;
    max-width: 18ch;
    margin-left: auto;
    margin-right: auto;
  }
  .marketplace-hero-subtitle {
    font-size: 0.875rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: 0.75rem;
  }
  .marketplace-card {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: 0 0 0;
    max-width: 100%;
  }
  .marketplace-category-cards {
    flex-direction: column;
    gap: 0.4rem;
    width: 100%;
  }
  .marketplace-category-card {
    width: 100%;
    min-width: 0;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1.125rem;
    font-size: 1rem;
    font-weight: 600;
    background: #fff;
    border: 2px solid #374151;
    border-radius: 4px;
    color: #1f2937;
  }
  .marketplace-category-card:hover {
    transform: none;
    background: #fff;
    border-color: #374151;
  }
  .marketplace-category-card.active {
    background: #4FD1A5;
    border-color: #4FD1A5;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  }
  .marketplace-category-card-icon {
    font-size: 1.625rem;
    margin-bottom: 0;
  }
  .marketplace-category-card-icon--marketplace {
    filter: brightness(1.35) saturate(1.4);
  }
  .marketplace-category-card-label {
    text-align: left;
  }
  .marketplace-search-wrap {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 2px solid rgba(255, 255, 255, 0.25);
  }
  .marketplace-search-form {
    gap: 0.5rem;
  }
  .marketplace-search-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  .marketplace-search-input-wrap {
    min-width: 0;
    border: 2px solid #374151;
    border-radius: 5px;
    min-height: 48px;
    display: flex;
    align-items: center;
  }
  .marketplace-search-input-wrap .marketplace-search-input {
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    font-size: 1rem;
    min-height: 44px;
  }
  .marketplace-search-input-wrap .marketplace-search-icon {
    left: 0.875rem;
  }
  .marketplace-search-icon-svg {
    width: 1.25rem;
    height: 1.25rem;
  }
  .marketplace-location-select {
    padding: 0.875rem 0.75rem;
    font-size: 1rem;
    border: 2px solid #374151;
    border-radius: 5px;
    min-width: 0;
  }
  .marketplace-search-button {
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 5px;
    background: #fff;
    color: #0d6b4a;
    border: 2px solid #4FD1A5;
  }
  .marketplace-search-button:hover {
    background: #F0FDF4;
    color: #0d6b4a;
    border-color: #4FD1A5;
  }
  .marketplace-subcategories-section {
    padding: 1rem 0 1.25rem;
  }
  .marketplace-subcategories-section .container {
    padding: 0 1rem;
  }
}

@media (max-width: 640px) {
  .marketplace-hero-title {
    font-size: 1.375rem;
  }
  .marketplace-hero-subtitle {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.85);
  }
}

.search-form {
  width: 100%;
}

.search-input-group {
  display: flex;
  gap: 0.75rem;
  max-width: 800px;
  margin: 0 auto;
  background: white;
  padding: 0.75rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.search-input {
  flex: 1;
  padding: 1.125rem 1.25rem;
  border: none;
  border-radius: 4px;
  font-size: 1.125rem;
  outline: none;
}

.location-input {
  max-width: 220px;
}

.search-button {
  padding: 1.125rem 2.5rem;
  background-color: #4FD1A5;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
}

/* Breadcrumbs */
.breadcrumbs {
  margin-bottom: 0.75rem;
  padding: 0.25rem 0;
}
.breadcrumbs-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.875rem;
  color: #6b7280;
  gap: 0.25rem;
}
.breadcrumbs-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.breadcrumbs-sep {
  color: #9ca3af;
  user-select: none;
}
.breadcrumbs-link {
  color: #4FD1A5;
  text-decoration: none;
}
.breadcrumbs-link:hover {
  text-decoration: underline;
}
.breadcrumbs-current {
  color: #374151;
  font-weight: 500;
}

/* Search Results Header - clean, minimal, no divider lines */
.search-results-header {
  background: #fff;
  padding: 0.6rem 0 0.75rem;
  overflow-x: hidden;
  position: sticky;
  top: 0;
  z-index: 50;
}

.search-results-header .container {
  max-width: 100%;
  overflow-x: hidden;
}

.search-results-header .section-header {
  margin-bottom: 0.4rem;
}

.search-results-header .section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #2B2F33;
  margin: 0;
}

.search-results-header .search-box-results {
  margin-top: 0.35rem;
}

/* Single compact toolbar row: count | sort | Filters */
.listings-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding: 0.5rem 0;
}

.listings-toolbar-count {
  margin: 0;
  font-size: 0.9375rem;
  color: #374151;
  font-weight: 500;
}

.sort-dropdown-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.sort-label {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
}
.sort-select {
  padding: 0.4rem 1.75rem 0.4rem 0.6rem;
  border: 1px solid #e5e7eb;
  border-radius: 5px;
  font-size: 0.875rem;
  background: white;
  color: #374151;
  cursor: pointer;
}

.btn-toolbar-filters {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 5px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.btn-toolbar-filters:hover {
  border-color: #4FD1A5;
  color: #4FD1A5;
  background: #f0fdf4;
}
.btn-toolbar-filters.hide {
  background: #4FD1A5;
  border-color: #4FD1A5;
  color: #fff;
}
.btn-toolbar-filters.hide:hover {
  background: #3db88a;
  border-color: #3db88a;
  color: #fff;
}
.btn-toolbar-filters-icon {
  flex-shrink: 0;
}
.btn-toolbar-filters-count {
  background: #4FD1A5;
  color: #fff;
  border-radius: 999px;
  padding: 0.15rem 0.4rem;
  font-size: 0.75rem;
  min-width: 1.1rem;
  text-align: center;
}
.btn-toolbar-filters.hide .btn-toolbar-filters-count {
  background: rgba(255,255,255,0.35);
}


.search-form-results {
  width: 100%;
}

.search-input-group-results {
  display: flex;
  gap: 0.6rem;
  max-width: 800px;
  margin: 0 auto;
  background: white;
  padding: 0.5rem 0.6rem;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.search-input-group-results .search-input {
  padding: 0.5rem 0.75rem;
  font-size: 0.9375rem;
}
.search-input-group-results .search-button {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Show Filters row - directly under search bar (desktop only) */
/* Show Filters button - centered under search bar, Place Ad green */
.show-filters-row {
  margin-top: 0.25rem;
  text-align: center;
}
.show-filters-row--desktop {
  display: block;
}
.btn-show-filters-under {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 6px 14px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  background: #4FD1A5;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 2px 6px rgba(79, 209, 165, 0.35);
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}
.btn-show-filters-under:hover {
  background: #3db88a;
  box-shadow: 0 3px 8px rgba(79, 209, 165, 0.4);
}
.btn-show-filters-under.hide {
  background: #3db88a;
  box-shadow: 0 2px 6px rgba(79, 209, 165, 0.35);
}
.btn-show-filters-under.hide:hover {
  background: #36a87d;
  box-shadow: 0 3px 8px rgba(79, 209, 165, 0.4);
}
.btn-show-filters-under .btn-toolbar-filters-count {
  background: rgba(255,255,255,0.3);
  color: #fff;
  border-radius: 999px;
  padding: 0.15rem 0.4rem;
  font-size: 0.75rem;
  min-width: 1.1rem;
  text-align: center;
}
.btn-show-filters-under.hide .btn-toolbar-filters-count {
  background: rgba(255,255,255,0.35);
}

/* Mobile Search Bar */
.mobile-search-bar {
  display: none;
}

.mobile-search-form {
  width: 100%;
  max-width: 100%;
}

.mobile-search-stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.mobile-search-input-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
  margin: 0 auto;
  background: white;
  padding: 0.5rem;
  border-radius: 8px;
  width: 100%;
  box-sizing: border-box;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mobile-search-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: 0.875rem 1rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  line-height: 1.5;
  outline: none;
  box-sizing: border-box;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
}

.mobile-search-icon-button {
  padding: 0.5rem;
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5F6368;
  transition: color 0.2s, background-color 0.2s;
  flex-shrink: 0;
  margin: 0;
}

.mobile-search-icon-button:hover {
  color: #4FD1A5;
  background-color: rgba(34, 197, 94, 0.1);
}

.mobile-search-icon-button svg {
  width: 20px;
  height: 20px;
}

/* General Filter Section - completely hidden until "Show Filters" is clicked; no bar visible */
.general-filter-section.general-filter-section-desktop {
  display: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

.general-filter-section.general-filter-section-desktop.show {
  display: block !important;
  padding-top: 0.35rem !important;
}

/* Compact desktop filter panel */
.general-filter-section.general-filter-section-desktop.show .general-filter-form-container {
  padding: 0.5rem 0 0;
}
.general-filter-section.general-filter-section-desktop.show .general-filter-form {
  gap: 0.5rem;
}
.general-filter-section.general-filter-section-desktop.show .general-filter-grid {
  gap: 0.5rem;
}
.general-filter-section.general-filter-section-desktop.show .general-filter-row-category-location,
.general-filter-section.general-filter-section-desktop.show .general-filter-price-row {
  margin-bottom: 0.35rem;
}
.general-filter-section.general-filter-section-desktop.show .general-filter-field label {
  font-size: 0.75rem;
  margin-bottom: 0.2rem;
}
.general-filter-section.general-filter-section-desktop.show .general-filter-input,
.general-filter-section.general-filter-section-desktop.show .general-filter-select {
  padding: 0.4rem 0.5rem;
  font-size: 0.8125rem;
}
.general-filter-section.general-filter-section-desktop.show .general-filter-select {
  background-position: right 0.4rem center;
  padding-right: 1.75rem;
}
.general-filter-section.general-filter-section-desktop.show .general-filter-button {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  max-width: 260px;
}
.general-filter-section.general-filter-section-desktop.show .general-filter-checkbox {
  font-size: 0.8125rem;
}

.general-filter-form-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem 0 0;
}

.general-filter-box {
  max-width: 900px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-top: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.general-filter-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.general-filter-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.875rem;
  margin-bottom: 0;
}

.general-filter-row-category-location {
  margin-bottom: 0.875rem;
}

.general-filter-price-row {
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 0.875rem;
}

.general-filter-field {
  display: flex;
  flex-direction: column;
}

.general-filter-field label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #5F6368;
  margin-bottom: 0.375rem;
}

.general-filter-input,
.general-filter-select {
  width: 100%;
  padding: 0.625rem;
  border: 1px solid #E0E0E0;
  border-radius: 4px;
  font-size: 0.875rem;
  color: #2B2F33;
  background: #FFFFFF;
  transition: border-color 0.3s;
}

.general-filter-select {
  cursor: pointer;
  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='%235F6368' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.625rem center;
  padding-right: 2rem;
}

.general-filter-button {
  padding: 0.875rem 2rem;
  background-color: #4FD1A5;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
}

.general-filter-button:hover {
  background-color: #4FD1A5;
}

.search-button {
  transition: background-color 0.15s ease-out, transform 0.15s ease-out;
}

.search-button:hover {
  background-color: #4FD1A5;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 209, 165, 0.3);
}

/* Car Filter Section */
.car-filter-section {
  padding: 1.5rem 0;
  background: #F7F9FB;
  display: block;
}
.car-filter-section--in-panel {
  padding-top: 0.75rem;
  padding-bottom: 1rem;
  background: transparent;
}

/* Hide by default only when it has the ID (Buy page filters) */
.car-filter-section#carFiltersSection {
  display: none;
}

.car-filter-section#carFiltersSection.show {
  display: block;
}

.filters-button-container {
  padding: 0;
  display: none;
}

.btn-show-filters {
  display: none;
}

/* Mobile filters: button and bottom sheet (visible only on small screens) */
.filters-button-container-mobile {
  display: none;
  padding: 0.5rem 0;
}
.btn-mobile-filters {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 100%;
  padding: 0.875rem 1.25rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  color: #2B2F33;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.btn-mobile-filters:hover {
  background: #f9fafb;
  border-color: #4FD1A5;
  color: #4FD1A5;
}
.btn-mobile-filters-count {
  background: #4FD1A5;
  color: #fff;
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  font-size: 0.8125rem;
  min-width: 1.25rem;
  text-align: center;
}
.mobile-filters-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.mobile-filters-overlay.open {
  display: block;
  opacity: 1;
}
.mobile-filters-bottom-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1001;
  background: #fff;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}
.mobile-filters-bottom-sheet.open {
  transform: translateY(0);
}
.mobile-filters-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}
.mobile-filters-sheet-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: #2B2F33;
}
.mobile-filters-sheet-close {
  background: none;
  border: none;
  font-size: 1.75rem;
  line-height: 1;
  color: #6b7280;
  cursor: pointer;
  padding: 0.25rem;
}
.mobile-filters-sheet-body {
  overflow-y: auto;
  padding: 1rem 1.25rem 2rem;
  -webkit-overflow-scrolling: touch;
}
.mobile-filters-sheet-body .general-filter-grid {
  grid-template-columns: 1fr;
}
.mobile-filters-sheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}
.mobile-filters-clear-all {
  color: #6b7280;
  font-size: 0.9375rem;
  text-decoration: none;
}
.mobile-filters-clear-all:hover {
  color: #4FD1A5;
  text-decoration: underline;
}
.mobile-filters-apply {
  flex: 1;
  min-width: 140px;
}
@media (max-width: 768px) {
  .general-filter-section-desktop,
  .filters-button-container-desktop {
    display: none !important;
  }
  .filters-button-container-mobile {
    display: block;
  }
}
@media (min-width: 769px) {
  .filters-button-container-mobile,
  .mobile-filters-overlay,
  .mobile-filters-bottom-sheet {
    display: none !important;
  }
}

.car-filter-box {
  max-width: 900px;
  margin: 0 auto;
  background: #FFFFFF;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.car-filter-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #2B2F33;
  margin-bottom: 1.25rem;
  text-align: center;
}

.car-filter-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.car-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.875rem;
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .car-filter-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.car-filter-form .form-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.car-filter-field {
  display: flex;
  flex-direction: column;
}

.car-filter-field label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #5F6368;
  margin-bottom: 0.375rem;
}

.car-filter-input,
.car-filter-select {
  width: 100%;
  padding: 0.625rem;
  border: 1px solid #E0E0E0;
  border-radius: 4px;
  font-size: 0.875rem;
  color: #2B2F33;
  background: #FFFFFF;
  transition: border-color 0.3s;
}

.car-filter-select {
  cursor: pointer;
  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='%235F6368' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.625rem center;
  padding-right: 2rem;
}

/* Style for select elements in forms - compact for Post Ad form */
.form-select,
select.form-select,
select[name*="make"],
select[name*="model"],
select[name*="year"] {
  width: 100%;
  padding: 0.4375rem 1.875rem 0.4375rem 0.6875rem;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 0.8125rem;
  color: #2B2F33;
  background: #FFFFFF;
  transition: border-color 0.3s;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%235F6368' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6875rem center;
  background-size: 10px;
  line-height: 1.3;
}

.form-select:focus,
select.form-select:focus,
select[name*="make"]:focus,
select[name*="model"]:focus,
select[name*="year"]:focus {
  outline: none;
  border-color: #4FD1A5;
  box-shadow: 0 0 0 2px #E8FBF4;
}

.car-filter-input:focus,
.car-filter-select:focus {
  outline: none;
  border-color: #4FD1A5;
}

.car-filter-input::placeholder {
  color: #9CA3AF;
}

.car-filter-button {
  padding: 0.875rem 1.5rem;
  background: #4FD1A5;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
}


.car-filter-button {
  transition: background 0.15s ease-out, transform 0.15s ease-out, box-shadow 0.15s ease-out;
}

.car-filter-button:hover {
  background: #4FD1A5;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79, 209, 165, 0.3);
}

.btn-clear-car-filters {
  padding: 0.75rem 1.5rem;
  background: white;
  color: #2B2F33;
  border: 2px solid #e0e0e0;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease-out;
  display: inline-block;
  margin-left: 1rem;
}

.btn-clear-car-filters:hover {
  background: #F7F9FB;
  border-color: #4FD1A5;
  color: #4FD1A5;
  transform: translateY(-1px);
}

/* Vehicle Type Filter Section */
.vehicle-type-filter-section {
  padding: 2rem 0;
  background: #F7F9FB;
  border-bottom: 1px solid #e0e0e0;
}

.vehicle-type-filter-box {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.vehicle-type-filter-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #2B2F33;
  margin-bottom: 1.5rem;
  text-align: center;
}

.vehicle-type-filter-form {
  width: 100%;
}

.vehicle-type-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.vehicle-type-option {
  display: flex;
  align-items: center;
  padding: 1rem;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease-out;
  position: relative;
}

.vehicle-type-option:hover {
  border-color: #4FD1A5;
  background: #F0FDF4;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79, 209, 165, 0.2);
}

.vehicle-type-option.active {
  border-color: #4FD1A5;
  background: #D1FAE5;
}

.vehicle-type-option input[type="radio"] {
  margin-right: 0.75rem;
  cursor: pointer;
  width: 18px;
  height: 18px;
  accent-color: #4FD1A5;
}

.vehicle-type-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}

.vehicle-type-icon {
  font-size: 2rem;
  line-height: 1;
}

.vehicle-type-label {
  font-weight: 500;
  color: #2B2F33;
  font-size: 0.9375rem;
  text-align: center;
}

.vehicle-type-option.active .vehicle-type-label {
  color: #4FD1A5;
  font-weight: 600;
}

.vehicle-type-count {
  color: #5F6368;
  font-size: 0.75rem;
}

.vehicle-type-option.active .vehicle-type-count {
  color: #4FD1A5;
}

.vehicle-type-filter-form .form-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
}

.btn-clear-vehicle-filters {
  padding: 0.75rem 1.5rem;
  background: white;
  color: #2B2F33;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.15s ease-out;
}

.btn-clear-vehicle-filters:hover {
  background: #F7F9FB;
  border-color: #4FD1A5;
  color: #4FD1A5;
  transform: translateY(-1px);
}

/* Category Filter Section (for Browse page) */
.category-filter-section {
  padding: 2rem 0;
  background: #F7F9FB;
  border-bottom: 1px solid #e0e0e0;
}

.category-filter-box {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.category-filter-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #2B2F33;
  margin-bottom: 1.5rem;
  text-align: center;
}

.category-filter-form {
  width: 100%;
}

/* Mobile: category dropdown (hidden on desktop) */
.category-filter-dropdown-mobile {
  display: none;
  margin-bottom: 1rem;
}

.category-select-mobile {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  background: white;
  color: #2B2F33;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.category-select-mobile:focus {
  border-color: #4FD1A5;
  outline: none;
}

/* Desktop: category radio grid (hidden on mobile) */
.category-filter-grid-desktop {
  display: grid;
}

.category-filter-grid {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.category-filter-option {
  display: flex;
  align-items: center;
  padding: 1rem;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease-out;
  position: relative;
}

.category-filter-option:hover {
  border-color: #4FD1A5;
  background: #F0FDF4;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79, 209, 165, 0.2);
}

.category-filter-option.active {
  border-color: #4FD1A5;
  background: #D1FAE5;
}

.category-filter-option input[type="radio"] {
  margin-right: 0.75rem;
  cursor: pointer;
  width: 18px;
  height: 18px;
  accent-color: #4FD1A5;
}

.category-filter-icon {
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
  margin-right: 0.5rem;
}

.category-filter-label {
  flex: 1;
  font-weight: 500;
  color: #2B2F33;
  font-size: 0.9375rem;
}

.category-filter-option.active .category-filter-label {
  color: #4FD1A5;
  font-weight: 600;
}

.category-count {
  color: #5F6368;
  font-size: 0.875rem;
  margin-left: 0.5rem;
}

.category-filter-option.active .category-count {
  color: #4FD1A5;
}

.category-filter-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.btn-clear-filter {
  padding: 0.75rem 1.5rem;
  background: white;
  color: #2B2F33;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.15s ease-out;
}

.btn-clear-filter:hover {
  background: #F7F9FB;
  border-color: #4FD1A5;
  color: #4FD1A5;
  transform: translateY(-1px);
}

.btn-apply-filter {
  padding: 0.75rem 1.5rem;
  background: #4FD1A5;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease-out;
}

.btn-apply-filter:hover {
  background: #4FD1A5;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

/* Popular right now / Trending searches */
.trending-searches-section {
  padding: 1.5rem 0;
  background: #f7f9fb;
  border-bottom: 1px solid #e5e7eb;
}
.trending-searches-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #2B2F33;
  margin-bottom: 1rem;
}
.trending-searches-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.trending-search-link {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  color: #374151;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.trending-search-link:hover {
  background: #F0FDF4;
  border-color: #4FD1A5;
  color: #0d6b4a;
}

/* Browse by Category (clickable cards) */
.browse-category-section {
  padding: 2rem 0;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}
.browse-category-title {
  font-size: 1.375rem;
  font-weight: 600;
  color: #2B2F33;
  margin-bottom: 1.25rem;
}
.browse-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}
.browse-category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1rem;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  text-decoration: none;
  color: #2B2F33;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  min-height: 100px;
}
.browse-category-card:hover {
  border-color: #4FD1A5;
  background: #F0FDF4;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.browse-category-icon {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  line-height: 1;
}
.browse-category-name {
  font-weight: 500;
  font-size: 0.9375rem;
  text-align: center;
}
.browse-category-count {
  font-size: 0.8125rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

/* Categories Section */
.categories-section {
  padding: 2rem 0;
  background: #FFFFFF;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #2B2F33;
  text-decoration: none;
  border-bottom: none;
}

.categories-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  flex-wrap: wrap;
  padding: 1rem 0;
}

.category-icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  text-decoration: none;
  color: #2B2F33;
  transition: transform 0.15s ease-out, color 0.15s ease-out;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 12px;
  min-height: 0;
}

.category-icon-item:hover {
  transform: translateY(-6px) scale(1.05);
  text-decoration: none;
  color: #4FD1A5;
}

.category-icon-large {
  font-size: 2.5rem;
  width: 60px;
  height: 60px;
  min-width: 60px;
  min-height: 60px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.1);
  transition: background 0.15s ease-out, transform 0.15s ease-out;
}

.category-icon-item:hover .category-icon-large {
  background: rgba(34, 197, 94, 0.2);
  transform: scale(1.1);
}

.category-icon-item span {
  font-size: 0.875rem;
  font-weight: 500;
  color: #2B2F33;
  transition: color 0.15s ease-out, font-weight 0.15s ease-out;
}

.category-icon-item:hover span {
  color: #4FD1A5;
  font-weight: 600;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.category-card {
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s;
  cursor: pointer;
  text-decoration: none !important;
  display: block;
  color: inherit;
}

.category-card:hover {
  border-color: #4FD1A5;
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(79, 209, 165, 0.2);
  text-decoration: none !important;
}

.category-card * {
  text-decoration: none !important;
  border-bottom: none !important;
}

.category-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.category-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: #2B2F33;
  text-decoration: none !important;
  border-bottom: none !important;
}

.category-card p {
  color: #5F6368;
  font-size: 0.875rem;
  text-decoration: none !important;
  border-bottom: none !important;
}

/* Listings Section - compact, premium */
.listings-section {
  padding: 1.25rem 0 2rem;
}
.listings-section .container {
  padding-left: 1rem;
  padding-right: 1rem;
}

.homepage-main-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  align-items: start;
}

.featured-listings-column {
  width: 100%;
}

/* When there's only the listings column (e.g. All Listings page), let it span full width */
.homepage-main-content>.featured-listings-column:only-child {
  grid-column: 1 / -1;
}

.sell-box-column {
  width: 100%;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.sell-box {
  background: #FFFFFF;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 20px;
}

.sell-box-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #2B2F33;
  margin-bottom: 1rem;
}

.sell-box-text {
  font-size: 0.9375rem;
  color: #5F6368;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.btn-place-ad {
  display: block;
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: #4FD1A5;
  color: white;
  text-align: center;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.3s;
  margin-bottom: 1.5rem;
}

.btn-place-ad {
  transition: background 0.15s ease-out, transform 0.15s ease-out, box-shadow 0.15s ease-out;
}

.btn-place-ad:hover {
  background: #4FD1A5;
  text-decoration: none;
  color: white;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(79, 209, 165, 0.4);
}

.sell-box-benefits {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.benefit-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: #2B2F33;
}

.check-icon {
  color: #4FD1A5;
  font-weight: bold;
  font-size: 1rem;
}

.view-all-link {
  color: #4FD1A5;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
}

.view-all-link:hover {
  text-decoration: underline;
}

.view-all-link {
  color: #4FD1A5;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease-out, transform 0.15s ease-out;
  display: inline-block;
}

.view-all-link:hover {
  text-decoration: underline;
  color: #4FD1A5;
  transform: translateX(4px);
}

/* Default: Buy/All Listings page uses 5 columns */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.5rem;
}

@media (max-width: 1400px) {
  .listings-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .listings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Pagination (search/browse) */
.pagination-wrapper {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

.pagination-wrapper nav.pagination {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pagination-wrapper .page-link,
.pagination-wrapper .prev a,
.pagination-wrapper .next a {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  background: #f3f4f6;
  color: #374151;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.9375rem;
}

.pagination-wrapper .page-link:hover,
.pagination-wrapper .prev a:hover,
.pagination-wrapper .next a:hover {
  background: #e5e7eb;
}

.pagination-wrapper .page-info {
  padding: 0 0.5rem;
  color: #6b7280;
  font-size: 0.9375rem;
}

.pagination-wrapper .current {
  padding: 0.5rem 0.75rem;
  background: #3B82F6;
  color: white;
  border-radius: 6px;
  font-weight: 600;
}

.pagination-wrapper .disabled a,
.pagination-wrapper .disabled span {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Homepage featured listings: 3 columns */
.listings-grid.homepage-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

@media (max-width: 1100px) {
  .listings-grid.homepage-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.listing-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.listing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.listing-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}
.listing-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.listing-badge-featured {
  background: #E0F2FE;
  color: #0369a1;
}
.listing-badge-new {
  background: #D1FAE5;
  color: #0d6b4a;
}
.listing-badge-price-drop {
  background: #FEF3C7;
  color: #92400e;
}
.listing-badge-urgent {
  background: #FFEDD5;
  color: #9a3412;
}
.listing-posted {
  font-size: 0.8125rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

.listing-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  position: relative;
  z-index: 1;
}

.listing-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #f3f4f6;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.listing-image-container {
  position: relative;
  width: 100%;
  height: 280px;
  overflow: hidden;
  position: relative;
}

.listing-image-container .listing-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listing-card-link .listing-image {
  position: relative;
}

.listing-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.favorite-heart-container {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 30;
  pointer-events: none;
}

.favorite-heart-btn {
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  position: relative;
  pointer-events: auto;
}

.favorite-heart-btn:hover {
  background: white;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.favorite-heart-btn svg {
  width: 20px;
  height: 20px;
  stroke: #5F6368;
  fill: none;
  transition: all 0.3s;
}

.favorite-heart-active svg {
  fill: #EF4444;
  stroke: #EF4444;
}

.favorite-heart-btn:hover svg {
  stroke: #EF4444;
}

.favorite-heart-active:hover svg {
  fill: #DC2626;
  stroke: #DC2626;
}

.listing-card .image-placeholder {
  min-height: 180px;
  aspect-ratio: 4 / 3;
  background: #e5e7eb;
  color: #6b7280;
  font-size: 2.5rem;
}
.image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
  font-size: 3rem;
}

.listing-content {
  padding: 1.25rem;
}

.listing-title {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.listing-link {
  color: #2B2F33;
  text-decoration: none;
}

.listing-link:hover {
  color: #4FD1A5;
}

.listing-location {
  color: #5F6368;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.listing-specs {
  font-size: 0.8125rem;
  color: #5F6368;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.listing-specs span {
  color: #5F6368;
}

.listing-specs span:not(:last-child)::after {
  content: "•";
  margin-left: 0.5rem;
  color: #9CA3AF;
}

.listing-description {
  color: #5F6368;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.listing-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid #e0e0e0;
}

.listing-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: #000000;
}

.btn-view {
  padding: 0.5rem 1rem;
  background-color: #4FD1A5;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.875rem;
  transition: background-color 0.3s;
}

.btn-view {
  transition: background-color 0.15s ease-out, transform 0.15s ease-out;
}

.btn-view:hover {
  background-color: #4FD1A5;
  transform: scale(1.05);
}

.listing-card-sold-label {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #374151;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 4px;
}

.empty-state {
  text-align: center;
  padding: 3rem 0;
}

.empty-message {
  font-size: 1.125rem;
  color: #5F6368;
}

.link {
  color: #4FD1A5;
  text-decoration: none;
  font-weight: 600;
}

.link:hover {
  text-decoration: underline;
}

/* CTA Section */
.cta-section {
  background: #F7F9FB;
  color: #2B2F33;
  padding: 3rem 0;
  text-align: center;
}

.cta-section h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.cta-section p {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
  opacity: 0.95;
}

.btn-cta {
  display: inline-block;
  padding: 1.5rem 3.5rem;
  background-color: #4FD1A5;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-size: 1.25rem;
  font-weight: 600;
  transition: background-color 0.3s, transform 0.3s;
}

.btn-cta {
  transition: background-color 0.15s ease-out, transform 0.15s ease-out, box-shadow 0.15s ease-out;
}

.btn-cta:hover {
  background-color: #4FD1A5;
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 209, 165, 0.4);
}

/* Footer */
.main-footer {
  background-color: #1a1a1a;
  color: #e0e0e0;
  padding: 3rem 0 1.5rem;
  margin-top: auto;
  border-top: 1px solid #333;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-section {
  display: flex;
  flex-direction: column;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.footer-logo-image {
  height: 32px;
  width: auto;
}

.footer-logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  margin: 0;
}

.footer-description {
  color: #b0b0b0;
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #e0e0e0;
  transition: all 0.15s ease-out;
  text-decoration: none;
}

.social-link:hover {
  background: #4FD1A5;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.social-link svg {
  width: 20px;
  height: 20px;
}

.footer-heading {
  font-size: 1rem;
  font-weight: 600;
  color: white;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links li {
  margin: 0;
}

.footer-link {
  color: #b0b0b0;
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 0.15s ease-out, transform 0.15s ease-out;
  display: inline-block;
}

.footer-link:hover {
  color: #4FD1A5;
  transform: translateX(4px);
}

.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 1.5rem;
  margin-top: 2rem;
}

.footer-bottom-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copyright {
  color: #888;
  font-size: 0.875rem;
  margin: 0;
}

.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  color: #888;
  font-size: 0.875rem;
}

.footer-bottom-links a {
  color: #888;
  text-decoration: none;
  transition: color 0.15s ease-out;
}

.footer-bottom-links a:hover {
  color: #4FD1A5;
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
  }

  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-social {
    justify-content: flex-start;
  }
}

/* Alert Messages */
.alert {
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 4px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

/* Authentication Pages */
.auth-container {
  max-width: 450px;
  margin: 3rem auto;
  padding: 2rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header h2 {
  font-size: 2rem;
  color: #2B2F33;
  margin-bottom: 0.5rem;
}

.auth-header p {
  color: #5F6368;
}

.auth-form .auth-hint {
  display: block;
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: normal;
  margin-top: 0.25rem;
}

.auth-form .field {
  margin-bottom: 1.5rem;
}

.auth-form label {
  display: block;
  margin-bottom: 0.5rem;
  color: #2B2F33;
  font-weight: 600;
}

.auth-form .password-field-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.auth-form .show-password-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
  cursor: pointer;
}

.auth-form .show-password-checkbox {
  width: 1rem;
  height: 1rem;
  cursor: pointer;
}

.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"],
.auth-form input[type="tel"],
.auth-form select,
.auth-form .auth-form-select {
  width: 100%;
  padding: 0.875rem;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s;
  background: #fff;
  cursor: pointer;
  appearance: auto;
}

.auth-form input:focus,
.auth-form select:focus,
.auth-form .auth-form-select:focus {
  outline: none;
  border-color: #4FD1A5;
}

.auth-form .actions {
  margin-top: 2rem;
}

.btn-auth {
  width: 100%;
  padding: 1rem;
  background: #4FD1A5;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
}

.btn-auth:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79, 209, 165, 0.4);
  background: #4FD1A5;
}

.auth-links {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e0e0e0;
}

.auth-links a {
  color: #4FD1A5;
  text-decoration: none;
  font-weight: 600;
}

.auth-links a:hover {
  text-decoration: underline;
}

.verified-seller-signup-option {
  margin-bottom: 1rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, #fefce8 0%, #fef9e7 50%, #f4e4a6 100%);
  border-radius: 8px;
  border: 1px solid #D4AF37;
}
.verified-seller-signup-row {
  display: flex;
  align-items: flex-start;
  flex-wrap: nowrap;
  gap: 0.5rem;
  margin: 0;
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #374151;
  line-height: 1.5;
}
.verified-seller-signup-checkbox {
  width: 1.125rem;
  height: 1.125rem;
  min-width: 1.125rem;
  flex-shrink: 0;
  margin: 0;
  margin-top: 0.35rem;
  cursor: pointer;
  accent-color: #B8860B;
}
.verified-seller-signup-label-text {
  flex: 1;
  min-width: 0;
}
.verified-seller-signup-link {
  color: #B8860B;
  font-weight: 700;
  text-decoration: none;
}
.verified-seller-signup-link:hover {
  color: #996f00;
  text-decoration: underline;
}

/* Static pages (Help, Legal, etc.) */
.static-page {
  padding: 2rem 0 4rem;
  min-height: 50vh;
}

.static-page-container {
  max-width: 720px;
  margin: 0 auto;
}

.static-page-title {
  font-size: 2rem;
  font-weight: 700;
  color: #2B2F33;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #4FD1A5;
  padding-bottom: 0.5rem;
}

.static-page-content {
  color: #374151;
  line-height: 1.65;
}

.static-lead {
  font-size: 1.125rem;
  color: #5F6368;
  margin-bottom: 2rem;
}

.static-section {
  margin-bottom: 2rem;
}

.static-section h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #2B2F33;
  margin-bottom: 0.75rem;
}

.static-list {
  margin: 0 0 1rem 1.25rem;
  padding: 0;
}

.static-list li {
  margin-bottom: 0.5rem;
}

.static-link {
  color: #4FD1A5;
  font-weight: 600;
  text-decoration: none;
}

.static-link:hover {
  text-decoration: underline;
}

/* Payment success page – full-width CTA, no truncation */
.payment-success-page .static-page-content {
  text-align: center;
}

.payment-success-page .payment-success-message {
  margin-bottom: 1.5rem;
}

.payment-success-page .btn-payment-success {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: #4FD1A5;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.2s, transform 0.15s, box-shadow 0.15s;
  margin-bottom: 1rem;
}

.payment-success-page .btn-payment-success:hover {
  background: #45b892;
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 209, 165, 0.35);
}

.payment-success-page .payment-success-actions {
  margin-bottom: 0.5rem;
}

.payment-success-page .payment-success-back {
  margin-top: 0.5rem;
}

.static-faq dt {
  font-weight: 600;
  color: #2B2F33;
  margin-top: 1.25rem;
  margin-bottom: 0.35rem;
}

.static-faq dd {
  margin-left: 0;
  margin-bottom: 0.5rem;
  color: #374151;
}

/* Admin area */
.admin-body {
  min-height: 100vh;
  background: #f3f4f6;
}

.admin-header {
  background: #1f2937;
  color: white;
  padding: 0.75rem 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.admin-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: white;
  text-decoration: none;
}

.admin-brand:hover {
  color: #9ca3af;
}

.admin-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.admin-nav-link {
  color: #d1d5db;
  text-decoration: none;
  font-size: 0.9375rem;
}

.admin-nav-link:hover {
  color: white;
}

.admin-nav-btn {
  background: #374151;
  color: white;
  border: none;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
}

.admin-nav-btn:hover {
  background: #4b5563;
}

.admin-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.admin-flash {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
}

.admin-flash-notice {
  background: #d1fae5;
  color: #065f46;
}

.admin-flash-alert {
  background: #fee2e2;
  color: #991b1b;
}

.admin-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  padding: 1.5rem;
  overflow-x: auto;
}

.admin-page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 1.5rem;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.admin-stat-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.admin-stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #1f2937;
}

.admin-stat-label {
  font-size: 0.875rem;
  color: #6b7280;
}

.admin-stat-link {
  font-size: 0.875rem;
  color: #4FD1A5;
  font-weight: 600;
  text-decoration: none;
  margin-top: 0.5rem;
}

.admin-stat-link:hover {
  text-decoration: underline;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.admin-table th,
.admin-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.admin-table th {
  font-weight: 600;
  color: #374151;
  background: #f9fafb;
}

.admin-table tr:hover {
  background: #f9fafb;
}

.admin-row-banned {
  background: #fef2f2;
}

.admin-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.admin-badge-admin {
  background: #dbeafe;
  color: #1e40af;
}

.admin-badge-banned {
  background: #fee2e2;
  color: #991b1b;
}

.admin-badge-ok {
  background: #d1fae5;
  color: #065f46;
}

.admin-badge-verified {
  background: linear-gradient(135deg, #fef9e7 0%, #f4e4a6 100%);
  color: #7c5a03;
  border: 1px solid #D4AF37;
}

.admin-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.admin-btn {
  padding: 0.35rem 0.65rem;
  border-radius: 4px;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  border: none;
  display: inline-block;
}

.admin-btn-default {
  background: #e5e7eb;
  color: #374151;
}

.admin-btn-default:hover {
  background: #d1d5db;
}

.admin-btn-success {
  background: #4FD1A5;
  color: white;
}

.admin-btn-success:hover {
  background: #4FD1A5;
}

.admin-btn-warning {
  background: #f59e0b;
  color: white;
}

.admin-btn-warning:hover {
  background: #d97706;
}

.admin-btn-danger {
  background: #ef4444;
  color: white;
}

.admin-btn-danger:hover {
  background: #dc2626;
}

.admin-muted {
  color: #9ca3af;
  font-size: 0.875rem;
}

.admin-pagination {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.admin-page-link {
  color: #4FD1A5;
  font-weight: 600;
  text-decoration: none;
}

.admin-page-link:hover {
  text-decoration: underline;
}

.admin-page-info {
  color: #6b7280;
  font-size: 0.9375rem;
}

.alert {
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 6px;
  border-left: 4px solid;
}

.alert-notice {
  background-color: #d4edda;
  border-color: #4FD1A5;
  color: #155724;
}

.alert-alert {
  background-color: #f8d7da;
  border-color: #dc3545;
  color: #721c24;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }

  .search-input-group,
  .search-input-group-results {
    flex-direction: column;
  }

  .location-input {
    max-width: 100%;
  }

  .search-results-header {
    padding: 1rem 0;
  }

  .search-results-header .section-title {
    font-size: 1.5rem;
    padding: 0 1rem;
  }

  .search-box-results {
    padding: 0 1rem;
  }

  .header-container {
    flex-direction: column;
    gap: 1rem;
  }

  .categories-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .listings-grid {
    grid-template-columns: 1fr;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .auth-buttons-hero {
    flex-direction: column;
    align-items: center;
  }

  .btn-hero {
    width: 100%;
    max-width: 300px;
  }

  .auth-container {
    margin: 2rem 1rem;
    padding: 1.5rem;
  }
}

/* Listing Detail Page */
.listing-detail {
  padding: 2rem 0;
  background: #f5f5f5;
  min-height: 100vh;
}

.listing-detail-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

.listing-main-content {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  width: 100%;
  margin-bottom: 2rem;
  justify-content: space-between;
}

.listing-images-section {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.image-gallery-container {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  width: 100%;
}

.main-image {
  flex: 1;
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  background: #f9fafb;
  border-radius: 8px;
  padding: 0.5rem;
}

.listing-main-image {
  width: 100%;
  height: auto;
  max-height: 600px;
  object-fit: contain;
  border-radius: 6px;
  display: block;
}

/* Navigation buttons removed - using thumbnails only */
.image-nav-btn {
  display: none;
}

.thumbnail-images-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 110px;
  flex-shrink: 0;
}

.thumbnail-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.2s ease;
  display: block;
  background: #f9fafb;
}

.thumbnail-image:hover {
  border-color: #4FD1A5;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.thumbnail-image.thumbnail-active {
  border-color: #4FD1A5;
  border-width: 4px;
  box-shadow: 0 4px 12px rgba(79, 209, 165, 0.4);
}

.view-all-photos-thumbnail {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  cursor: pointer;
  border: 3px solid #e5e7eb;
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.view-all-photos-thumbnail:hover {
  border-color: #4FD1A5;
  background: #f0fdf4;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(79, 209, 165, 0.2);
}

.view-all-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  text-align: center;
}

.view-all-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: #4FD1A5;
}

.view-all-label {
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 500;
}

/* Legacy class for backward compatibility */
.thumbnail-images {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1rem;
  padding: 0.5rem;
}

/* Image Modal/Lightbox */
.image-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  overflow: auto;
}

.image-modal-content {
  margin: auto;
  display: block;
  width: auto;
  max-width: 90%;
  max-height: 90vh;
  margin-top: 5vh;
  object-fit: contain;
}

.image-modal-close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10000;
  transition: color 0.3s;
}

.image-modal-close:hover,
.image-modal-close:focus {
  color: #bbb;
}

.image-modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.3);
  color: white;
  border: none;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  font-size: 2.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
  z-index: 10000;
}

.image-modal-nav:hover {
  background: rgba(255, 255, 255, 0.5);
}

.image-modal-prev {
  left: 30px;
}

.image-modal-next {
  right: 30px;
}

.image-placeholder-large {
  width: 100%;
  height: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
  border-radius: 8px;
  font-size: 4rem;
  color: #999;
}

.image-placeholder-large p {
  margin-top: 1rem;
  font-size: 1rem;
  color: #666;
}

.listing-details-section {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Listing Details Below Images */
.listing-details-below-images {
  width: 100%;
}

.listing-details-below-images .listing-header {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 2px solid #e5e7eb;
}

.listing-details-below-images .listing-detail-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.listing-details-below-images .listing-price-section {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 2px solid #e5e7eb;
}

.listing-details-below-images .listing-price-large {
  font-size: 2rem;
  font-weight: 700;
  color: #000000;
}

.listing-details-below-images .listing-info {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 2px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.listing-details-below-images .info-item {
  font-size: 1rem;
  color: #374151;
}

.listing-details-below-images .info-item strong {
  color: #1f2937;
  font-weight: 600;
  margin-right: 0.5rem;
}

.listing-details-below-images .category-details {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 2px solid #e5e7eb;
}

.listing-details-below-images .category-details h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 1rem;
}

.listing-images-section .listing-actions {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid #e5e7eb;
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.listing-description-section {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 2px solid #e5e7eb;
}

.listing-description-section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 1rem;
}

.listing-description-section .listing-description {
  font-size: 1rem;
  line-height: 1.7;
  color: #374151;
}

/* Mobile: short description + Read all */
.listing-description-wrap.collapsed .listing-description {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.listing-description-wrap.expanded .listing-description {
  display: block;
}

.btn-read-all {
  margin-top: 0.5rem;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  color: #3b82f6;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  min-height: 44px;
  min-width: 80px;
  display: inline-flex;
  align-items: center;
  -webkit-tap-highlight-color: transparent;
}

.btn-read-all:hover {
  text-decoration: underline;
  color: #2563eb;
}

/* Desktop: always show full description, hide Read all */
@media (min-width: 769px) {
  .listing-description-section .listing-description-wrap .listing-description {
    display: block !important;
    -webkit-line-clamp: unset;
    overflow: visible;
  }

  .listing-description-section .btn-read-all {
    display: none;
  }
}

/* Seller Info Card */
.seller-info-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.5rem;
  width: 380px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  align-self: flex-start;
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  margin-left: auto;
}

.seller-info-header {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px dashed #e5e7eb;
}

.seller-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.seller-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 600;
  color: #6b7280;
  background: #e5e7eb;
}

.seller-info-text {
  flex: 1;
}

.seller-name-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.seller-name {
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}

.seller-verified {
  color: #B8860B;
  font-size: 1rem;
  font-weight: bold;
}

.seller-type-location {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0.25rem 0;
}

.seller-type-location .separator {
  margin: 0 0.5rem;
  color: #9ca3af;
}

.seller-verification {
  font-size: 0.75rem;
  color: #6b7280;
  margin: 0.25rem 0 0 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.verification-check {
  color: #4FD1A5;
  font-weight: bold;
}

.seller-badge-verified {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #7c5a03;
  background: linear-gradient(135deg, #fef9e7 0%, #f4e4a6 100%);
  border: 1px solid #D4AF37;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.3);
}
.seller-badge-verified-partial {
  background: #E0F2FE;
  color: #0369a1;
}

.seller-badge-contact {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #4b5563;
  background: #f3f4f6;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.seller-meta {
  font-size: 0.8125rem;
  color: #6b7280;
  margin: 0.25rem 0 0 0;
}

.seller-stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}

.seller-stat-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.stat-icon {
  font-size: 1.25rem;
  color: #6b7280;
  margin-bottom: 0.25rem;
}

.stat-content {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
}

.stat-label {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

.seller-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.btn-seller-primary {
  width: 100%;
  padding: 0.625rem 1.25rem;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
  display: block;
}

.btn-seller-primary:hover {
  background: #2563eb;
}

.btn-seller-action {
  width: 100%;
  padding: 0.625rem 1.25rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid #e5e7eb;
  background: white;
  color: #374151;
  display: block;
}

.btn-seller-action:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.seller-phone-display {
  padding: 0.625rem 0.75rem;
  background: #f9fafb;
  border-radius: 6px;
  font-size: 0.875rem;
  color: #374151;
  border-top: 1px dashed #e5e7eb;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
}

.seller-phone-display strong {
  color: #1f2937;
  font-weight: 600;
  margin-right: 0.5rem;
}

.phone-number-link {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
}

.phone-number-link:hover {
  text-decoration: underline;
}

.seller-phone-display .phone-call-hint {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.8125rem;
  color: #6b7280;
  font-weight: normal;
}

.profile-phone .phone-number-link {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
}

.profile-phone .phone-number-link:hover {
  text-decoration: underline;
}

.seller-view-ads {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed #e5e7eb;
  text-align: center;
}

.view-ads-link {
  color: #3b82f6;
  text-decoration: underline;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.view-ads-link:hover {
  color: #2563eb;
}

.listing-contact-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.btn-contact-top {
  width: 100%;
  text-align: center;
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
}

.seller-phone-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: #f7f9fb;
  border-radius: 6px;
  font-size: 1.1rem;
}

.seller-phone-top strong {
  color: #333;
  font-weight: 600;
}

.phone-link {
  color: #4FD1A5;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.phone-link:hover {
  color: #4FD1A5;
  text-decoration: underline;
}

.listing-owner-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.listing-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e0e0e0;
}

.listing-detail-title {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #333;
}

.listing-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.category-badge {
  background: #667eea;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 600;
}

.listing-badge-sold,
.listing-badge-sold-overlay {
  background: #374151;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.listing-badge-sold--detail {
  font-size: 1.125rem;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
}

.listing-badge-sold-overlay {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
}

/* Big "SOLD" overlay on listing image (cards + detail) */
.listing-sold-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  z-index: 2;
  pointer-events: none;
}

.listing-sold-text {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  padding: 0.5rem 1rem;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 4px;
}

.listing-sold-overlay--detail .listing-sold-text {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  letter-spacing: 0.2em;
  padding: 0.75rem 1.5rem;
  border-width: 4px;
}

.listing-card .listing-image,
.similar-listing-card .similar-listing-image {
  position: relative;
}

.btn-seller-action.btn-sold {
  background: #374151;
  color: white;
  border-color: #374151;
}

.btn-seller-action.btn-sold:hover {
  background: #1f2937;
  border-color: #1f2937;
  color: white;
}

.btn-seller-action.btn-available {
  background: #4FD1A5;
  color: white;
  border-color: #4FD1A5;
}

.btn-seller-action.btn-available:hover {
  background: #4FD1A5;
  border-color: #4FD1A5;
  color: white;
}

.btn-seller-action.btn-boost {
  background: #F59E0B;
  color: white;
  border-color: #F59E0B;
}
.btn-seller-action.btn-boost:hover {
  background: #D97706;
  border-color: #D97706;
  color: white;
}

.btn-boost-small {
  padding: 0.35rem 0.65rem;
  background: #F59E0B;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.8125rem;
  font-weight: 600;
}
.btn-boost-small:hover {
  background: #D97706;
  color: white;
}

.btn-verified-seller {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #B8860B 0%, #D4AF37 100%);
  color: #1a1a1a;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9375rem;
  margin-top: 0.5rem;
  border: 1px solid #996f00;
  box-shadow: 0 1px 3px rgba(184, 134, 11, 0.3);
}
.btn-verified-seller:hover {
  background: linear-gradient(135deg, #996f00 0%, #B8860B 100%);
  color: #fff;
  border-color: #7c5a03;
}

.verified-badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.2rem 0.5rem;
  background: linear-gradient(135deg, #fef9e7 0%, #f4e4a6 100%);
  color: #7c5a03;
  border: 1px solid #D4AF37;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.25);
}
.verified-badge-inline {
  margin-left: 0.25rem;
  color: #B8860B;
  font-weight: bold;
  text-shadow: 0 0 1px rgba(212, 175, 55, 0.5);
}
/* Golden username for verified sellers (profile and seller card) */
.seller-name.verified-seller-name,
h1 .profile-name-verified {
  color: #B8860B;
  font-weight: 700;
}
.seller-link.verified-seller-link {
  color: #B8860B;
  font-weight: 700;
}
.seller-link.verified-seller-link:hover {
  color: #996f00;
  text-decoration: underline;
}
.listing-badge-boosted {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  background: #FFFBEB;
  color: #92400e;
  border: 2px solid #D4AF37;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 0.25rem;
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.4);
}
.listing-card-boosted {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1), 0 0 0 2px #D4AF37;
  border: 1px solid #D4AF37;
}
.listing-card-boosted:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1), 0 0 0 2px #D4AF37;
}
.verified-seller-section {
  margin-top: 1.5rem;
  padding: 1rem;
  background: linear-gradient(135deg, #fefce8 0%, #fef9e7 50%, #f4e4a6 100%);
  border-radius: 8px;
  border: 1px solid #D4AF37;
}
.verified-seller-section p {
  margin: 0.25rem 0;
}

.btn-share-listing,
.btn-report-listing {
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-size: 0.9375rem;
  text-decoration: none;
  border: 2px solid #e5e7eb;
  background: white;
  color: #374151;
  cursor: pointer;
  font-family: inherit;
}

.btn-share-listing:hover,
.btn-report-listing:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.btn-report-listing {
  color: #6b7280;
}

.similar-listings-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid #e5e7eb;
}

.similar-listings-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: #333;
}

.similar-listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.similar-listing-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  background: white;
}

.similar-listing-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.similar-listing-image {
  aspect-ratio: 1;
  background: #f3f4f6;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.similar-listing-image .image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.similar-listing-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.similar-listing-content {
  padding: 0.5rem 0.75rem;
}

.similar-listing-title {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 0.25rem 0;
  color: #333;
  line-height: 1.3;
}

.similar-listing-price {
  font-size: 0.8125rem;
  color: #4FD1A5;
  font-weight: 600;
}

.save-search-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.save-search-name-input {
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.875rem;
  max-width: 200px;
}

.btn-save-search {
  padding: 0.5rem 1rem;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  cursor: pointer;
}

.btn-save-search:hover {
  background: #2563eb;
}

.general-filter-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.general-filter-checkbox input {
  width: auto;
}

.saved-searches-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.saved-search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  background: white;
}

.saved-search-link {
  font-weight: 600;
  color: #3b82f6;
  text-decoration: none;
}

.saved-search-link:hover {
  text-decoration: underline;
}

.saved-search-params {
  display: block;
  font-size: 0.8125rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

.btn-delete-small {
  padding: 0.35rem 0.75rem;
  font-size: 0.8125rem;
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.btn-delete-small:hover {
  background: #dc2626;
}

.form-container {
  max-width: 480px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.form-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 2rem;
}

.form-card h1 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: #333;
}

.form-subtitle {
  font-size: 0.9375rem;
  color: #6b7280;
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: #374151;
}

.form-control {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 1rem;
}

.boost-ad-option {
  margin-top: 1rem;
  padding: 0.875rem 1rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.boost-ad-option-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #92400e;
  cursor: pointer;
  line-height: 1.4;
}
.boost-ad-option-label .boost-ad-checkbox {
  flex-shrink: 0;
  margin: 0;
  vertical-align: middle;
}
.boost-ad-checkbox {
  width: 1.125rem;
  height: 1.125rem;
  cursor: pointer;
}
.boost-ad-option .form-help {
  margin-top: 0.35rem;
  margin-bottom: 0;
  margin-left: 0;
}
.boost-ad-option .form-help-link {
  color: #B8860B;
  font-weight: 600;
  text-decoration: none;
}
.boost-ad-option .form-help-link:hover {
  text-decoration: underline;
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.btn-secondary {
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  background: #e5e7eb;
  color: #374151;
  border: none;
  font-size: 1rem;
  cursor: pointer;
}

.btn-secondary:hover {
  background: #d1d5db;
}

.admin-row-muted {
  opacity: 0.7;
}

.admin-badge-warning {
  background: #f59e0b;
  color: white;
}

.subcategory-badge {
  background: #4FD1A5;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 600;
}

.listing-date {
  color: #666;
  font-size: 0.875rem;
}

.listing-price-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e0e0e0;
}

.listing-price-large {
  font-size: 1.25rem;
  font-weight: 600;
  color: #000000;
}

.listing-info {
  margin-bottom: 1.5rem;
  padding: 1.25rem;
}

.listing-card .listing-info {
  padding: 1.25rem;
  margin-bottom: 0;
}

.info-item {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  align-items: center;
}

.info-item strong {
  color: #333;
  min-width: 100px;
}

.info-item span {
  color: #666;
}

.listing-description {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e0e0e0;
}

.listing-description h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #333;
}

.listing-description p {
  color: #666;
  line-height: 1.8;
  white-space: pre-wrap;
}

.listing-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.category-details {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e0e0e0;
}

.category-details:last-child {
  border-bottom: none;
}

.category-details h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #333;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.detail-item strong {
  color: #333;
  font-weight: 600;
}

.detail-item span {
  color: #666;
}

.features-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.feature-badge {
  background: #E8FBF4;
  color: #4FD1A5;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
}

.btn-edit,
.btn-delete,
.btn-back {
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn-edit {
  background: #667eea;
  color: white;
}

.btn-edit:hover {
  background: #5568d3;
}

.btn-delete {
  background: #ff6b6b;
  color: white;
}

.btn-delete:hover {
  background: #ff5252;
}

.btn-back {
  background: #e0e0e0;
  color: #333;
}

.btn-back:hover {
  background: #d0d0d0;
}

.btn-contact {
  padding: 0.75rem 1.5rem;
  background: #4FD1A5;
  color: white;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  display: inline-block;
}

.btn-contact:hover {
  background: #4FD1A5;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

.btn-favorite {
  padding: 0.75rem 1.5rem;
  background: white;
  color: #2B2F33;
  border: 2px solid #E0E0E0;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
  cursor: pointer;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-favorite:hover {
  background: #F7F9FB;
  border-color: #4FD1A5;
  color: #4FD1A5;
}

.btn-favorite svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

.btn-favorite-active {
  background: #E8FBF4;
  border-color: #4FD1A5;
  color: #4FD1A5;
}

.btn-favorite-active svg {
  fill: currentColor;
  stroke: none;
}

.btn-favorite-active:hover {
  background: #D1F2E5;
  border-color: #4FD1A5;
  color: #1d8a5f;
}

.btn-remove-favorite {
  padding: 0.5rem 1rem;
  background: #EF4444;
  color: white;
  border: 1px solid #EF4444;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
  cursor: pointer;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-remove-favorite:hover {
  background: #DC2626;
  border-color: #DC2626;
}

.btn-remove-favorite svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.listing-card-actions {
  padding: 1rem;
  border-top: 1px solid #E0E0E0;
  display: flex;
  justify-content: flex-end;
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.empty-state h2 {
  font-size: 1.5rem;
  color: #2B2F33;
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: #5F6368;
  margin-bottom: 2rem;
}

.empty-state-heading {
  font-size: 1.25rem;
  font-weight: 600;
  color: #2B2F33;
  margin-bottom: 0.5rem;
}
.empty-state-actions {
  margin: 1.5rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}
.empty-state-link {
  color: #4FD1A5;
  font-weight: 500;
  text-decoration: none;
}
.empty-state-link:hover {
  text-decoration: underline;
}
.empty-state-link-cat {
  padding: 0.35rem 0.75rem;
  background: #F0FDF4;
  border-radius: 6px;
  border: 1px solid #4FD1A5;
}
.empty-state-sep {
  color: #9ca3af;
  font-size: 0.9375rem;
}
.empty-state-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.empty-state-sub {
  font-size: 0.9375rem;
  color: #6b7280;
  margin-top: 1rem !important;
}

/* New Listing Page Header */
.new-listing-page {
  padding: 2rem 0;
  background: #f5f5f5;
  min-height: 100vh;
}

.new-listing-header {
  max-width: 800px;
  margin: 0 auto 2rem;
  padding: 0 1.5rem;
  text-align: center;
}

.new-listing-header h1 {
  font-size: 2.5rem;
  color: #333;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.new-listing-header p {
  font-size: 1.125rem;
  color: #666;
}

.back-link-container {
  max-width: 800px;
  margin: 2rem auto 0;
  padding: 0 1.5rem;
  text-align: center;
}

.back-link {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.back-link+.back-link {
  margin-left: 1rem;
}

.back-link:hover {
  color: #5568d3;
  text-decoration: underline;
}

/* Listing Form Styles */
.form-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e0e0e0;
}

.form-section:last-of-type {
  border-bottom: none;
}

.form-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: #2B2F33;
}

.form-field {
  margin-bottom: 1.5rem;
}

.form-field label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #2B2F33;
}

.form-field input[type="text"],
.form-field input[type="number"],
.form-field textarea,
.form-field select,
.form-input {
  width: 100%;
  padding: 0.875rem;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: #4FD1A5;
}

.form-select {
  background: white;
  cursor: pointer;
}

.file-input {
  padding: 0.5rem;
  border: 2px dashed #e0e0e0;
  border-radius: 6px;
  width: 100%;
  cursor: pointer;
}

/* Professional Image Upload Zone */
.image-upload-zone {
  position: relative;
  width: 100%;
  min-height: 300px;
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 1.5rem;
  z-index: 1;
}

.image-upload-zone:hover {
  border-color: #60A5FA;
  background: #f8fafc;
}

.image-upload-zone.drag-over {
  border-color: #60A5FA;
  background: #eff6ff;
  border-style: solid;
}

.image-upload-input-hidden {
  /* Always hide the native file input and let it act as an invisible overlay */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
  border: none;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.upload-zone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  pointer-events: auto;
  cursor: pointer;
}

.upload-icon {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-primary-text {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 0.5rem 0;
}

.upload-secondary-text {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0 0 1rem 0;
}

.upload-info-text {
  font-size: 0.875rem;
  color: #9ca3af;
  margin: 0.5rem 0 0.25rem 0;
}

.upload-format-text {
  font-size: 0.75rem;
  color: #9ca3af;
  margin: 0;
}

.form-help {
  color: #5F6368;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.btn-lookup {
  padding: 0.75rem 1.5rem;
  background: #4FD1A5;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
  white-space: nowrap;
}

.btn-lookup:hover {
  background: #4FD1A5;
  transform: translateY(-1px);
}

.btn-lookup:disabled {
  background: #9CA3AF;
  cursor: not-allowed;
  transform: none;
}

.form-input {
  width: 100%;
  padding: 0.875rem;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.form-input:focus {
  outline: none;
  border-color: #4FD1A5;
}

.existing-images {
  margin-top: 1rem;
}

/* New select-based image ordering UI */
.image-thumbnails-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  visibility: visible !important;
  opacity: 1 !important;
  background: linear-gradient(to bottom, #ffffff, #f9fafb);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  min-height: 100px;
}

.existing-images {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.image-thumbnail-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #e5e7eb;
  background: white;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.image-thumbnail-item:hover {
  border-color: #4FD1A5;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.new-image-placeholder {
  border: 2px dashed #4FD1A5 !important;
  background: #f0fdf4;
}

.new-image-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  background: #4FD1A5;
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  z-index: 10;
  pointer-events: none;
}

.cover-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  background: #4FD1A5;
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  z-index: 10;
  pointer-events: none;
}

.image-thumbnail-item.drag-insert-before {
  border-top: 3px solid #4FD1A5;
}

.image-thumbnail-item.drag-insert-after {
  border-bottom: 3px solid #4FD1A5;
}

.thumbnail-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block !important;
  max-width: 100%;
  max-height: 100%;
  visibility: visible !important;
  opacity: 1 !important;
}

.remove-thumbnail-image {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(239, 68, 68, 0.95);
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 100;
  pointer-events: auto !important;
  font-weight: bold;
}

.image-thumbnail-item:hover .remove-thumbnail-image {
  opacity: 1;
}

.remove-thumbnail-image:hover {
  background: rgba(220, 38, 38, 1);
  transform: scale(1.1);
}

.remove-thumbnail-image:active {
  transform: scale(0.95);
}

.image-order-selects {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.image-order-selects>.form-help {
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: #374151;
  text-transform: none;
  letter-spacing: normal;
}

.order-selects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 0.75rem;
}

.order-select-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  transition: all 0.2s ease;
}

.order-select-item:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.order-select-item:has(.order-select:focus) {
  background: #ffffff;
  border-color: #4FD1A5;
  box-shadow: 0 0 0 3px rgba(79, 209, 165, 0.1);
}

.order-select-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
  text-transform: none;
  letter-spacing: 0.3px;
  margin-bottom: 0.25rem;
}

.order-select-item:first-child .order-select-label {
  color: #4FD1A5;
  font-weight: 700;
}

.order-select {
  width: 100%;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  border: 2px solid #e5e7eb;
  border-radius: 6px;
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #1f2937;
  font-weight: 500;
}

.order-select:hover {
  border-color: #d1d5db;
  background: #ffffff;
}

.order-select:focus {
  outline: none;
  border-color: #4FD1A5;
  box-shadow: 0 0 0 3px rgba(79, 209, 165, 0.1);
  background: #ffffff;
}

.order-select option {
  padding: 0.5rem;
  font-size: 0.875rem;
}

.order-select option:disabled {
  color: #9ca3af;
  font-style: italic;
}

/* Responsive adjustments for image ordering */
@media (max-width: 768px) {
  .order-selects-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
  }

  .order-select-item {
    padding: 0.5rem;
  }

  .image-order-selects {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .order-selects-grid {
    grid-template-columns: 1fr;
  }

  .image-thumbnails-grid {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 0.75rem;
    padding: 0.75rem;
  }
}

.existing-images p {
  margin-bottom: 0.75rem;
  color: #5F6368;
}

.existing-images-grid,
#photos {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.existing-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 1rem;
}

.existing-image {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 4px;
  border: 2px solid #e0e0e0;
  pointer-events: none;
  /* Prevent image from interfering with drag */
  user-select: none;
  -webkit-user-drag: none;
  -moz-user-select: none;
}

.existing-image-item,
.photo-item {
  position: relative;
  cursor: grab;
  pointer-events: auto !important;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  touch-action: none;
  /* Prevent touch scrolling during drag */
}

.existing-image-item:active,
.photo-item:active,
.image-thumbnail-item:active {
  cursor: grabbing;
}

.existing-image-item.dragging,
.image-thumbnail-item.dragging {
  opacity: 0.5;
  border-color: #667eea;
  transform: scale(1.05);
  z-index: 1000;
}

.existing-image-item.drag-over,
.image-thumbnail-item.drag-over {
  border-color: #4FD1A5;
  border-width: 3px;
  transform: scale(1.02);
}

.existing-image-item[draggable="true"],
.photo-item[draggable="true"] {
  cursor: grab;
}

.existing-image-item .remove-existing-image {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(239, 68, 68, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 10;
}

.existing-image-item:hover .remove-existing-image {
  opacity: 1;
}

.existing-image-item .remove-existing-image:hover {
  background: rgba(220, 38, 38, 1);
}

/* Image Preview Container */
.image-preview-container {
  margin-top: 1.5rem;
  padding: 1rem;
  background: #f7f9fb;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

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

.image-preview-item {
  position: relative;
  cursor: grab;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #e0e0e0;
  transition: all 0.3s;
  background: white;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-user-drag: element;
}

.image-preview-item:active {
  cursor: grabbing;
}

.image-preview-item:hover {
  border-color: #667eea;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.image-preview-item.dragging {
  opacity: 0.5;
  border-color: #667eea;
  transform: scale(1.05);
  cursor: grabbing;
  z-index: 1000;
}

.image-preview-item.drag-over {
  border-color: #4FD1A5;
  border-width: 3px;
  transform: scale(1.02);
}

.image-preview-item .preview-image {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
  pointer-events: none !important;
  /* Prevent image from interfering with drag */
  user-select: none;
  -webkit-user-drag: none;
  -moz-user-select: none;
}

.image-preview-item .preview-overlay {
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, transparent 30%);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 8px;
  opacity: 0;
  transition: opacity 0.3s;
  /* Allow drag events to pass through */
}

.image-preview-item:hover .preview-overlay {
  opacity: 1;
}

.preview-left,
.existing-image-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  pointer-events: auto;
  /* Buttons inside should be clickable */
}

.preview-right,
.existing-image-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  pointer-events: auto;
  /* Buttons inside should be clickable */
}

.main-badge,
.main-badge-existing {
  background: #4FD1A5;
  color: white;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.set-main-image,
.set-main-existing-image {
  background: rgba(255, 215, 0, 0.9);
  color: #333;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  padding: 0;
}

.set-main-image:hover,
.set-main-existing-image:hover {
  background: rgba(255, 215, 0, 1);
  transform: scale(1.1);
}

.existing-image-item .existing-image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, transparent 30%);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 8px;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none !important;
  /* Allow drag events to pass through */
}

.existing-image-item .existing-image-left,
.existing-image-item .existing-image-right {
  pointer-events: auto !important;
  /* Buttons inside should be clickable */
}

.existing-image-item button {
  pointer-events: auto !important;
  cursor: pointer;
}

.existing-image-item:hover .existing-image-overlay {
  opacity: 1;
}

.existing-image-item.dragging {
  opacity: 0.5;
  border: 2px solid #667eea;
  transform: scale(1.05);
  z-index: 1000;
  cursor: grabbing !important;
  pointer-events: auto;
}

.existing-image-item.drag-over {
  border: 3px solid #4FD1A5;
  transform: scale(1.02);
}

.main-badge-existing {
  position: absolute;
  top: 4px;
  left: 4px;
  background: #4FD1A5;
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  z-index: 10;
  pointer-events: none;
}

.existing-image-item .existing-image,
.photo-item img {
  pointer-events: none !important;
  user-select: none;
  -webkit-user-drag: none;
  -moz-user-select: none;
  /* Prevent image from interfering with drag */
}

.image-preview-item .preview-number {
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.image-preview-item .remove-preview-image {
  background: rgba(239, 68, 68, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
  pointer-events: auto;
  /* Ensure buttons are clickable */
  z-index: 10;
}

.image-preview-item .remove-preview-image:hover {
  background: rgba(220, 38, 38, 1);
}

.image-preview-item .set-main-image {
  pointer-events: auto;
  /* Ensure buttons are clickable */
  z-index: 10;
}

.form-errors {
  background: #f8d7da;
  color: #721c24;
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 2rem;
  border-left: 4px solid #dc3545;
}

.form-errors h2 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.form-errors ul {
  margin-left: 1.5rem;
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.btn-submit {
  padding: 1rem 2rem;
  background: #4FD1A5;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
  background: #4FD1A5;
}

.btn-cancel {
  padding: 1rem 2rem;
  background: #e0e0e0;
  color: #2B2F33;
  text-decoration: none;
  border-radius: 6px;
  font-size: 1.125rem;
  font-weight: 600;
  display: inline-block;
  transition: background-color 0.3s;
}

.btn-cancel:hover {
  background: #d0d0d0;
}

.listing-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

/* Messages Page */
.messages-page {
  padding: 2rem 0;
  background: #F7F9FB;
  min-height: 100vh;
}

.conversations-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.conversation-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border-left: 4px solid transparent;
  border: 1px solid #e8e8e8;
}

.conversation-card.has-unread {
  border-left-color: #4FD1A5;
  background: linear-gradient(to right, #E8FBF4 0%, white 4%);
  box-shadow: 0 4px 12px rgba(79, 209, 165, 0.15);
  border-color: #E8FBF4;
}

.conversation-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
  border-color: #bbf7d0;
}

.conversation-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.conversation-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 1rem;
}

.conversation-user-info {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex: 1;
}

.user-avatar-small {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #4FD1A5;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.375rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(79, 209, 165, 0.3);
  border: 3px solid white;
}

.conversation-details {
  flex: 1;
}

.conversation-user-name {
  font-weight: 700;
  color: #2B2F33;
  font-size: 1.125rem;
  margin-bottom: 0.375rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.unread-badge-small {
  background: #4FD1A5;
  color: white;
  padding: 0.25rem 0.625rem;
  border-radius: 14px;
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 22px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(79, 209, 165, 0.3);
}

.conversation-listing {
  color: #5F6368;
  font-size: 0.875rem;
  font-weight: 500;
}

.conversation-time {
  color: #999;
  font-size: 0.8125rem;
  white-space: nowrap;
  font-weight: 500;
}

.conversation-preview {
  margin-top: 0.75rem;
}

.message-bubble-preview {
  background: #f0f0f0;
  border-radius: 16px;
  padding: 0.875rem 1.125rem;
  max-width: 75%;
  border: 1px solid #e8e8e8;
}

.message-bubble-preview.sent {
  background: linear-gradient(135deg, #e8f0fe 0%, #e3f2fd 100%);
  margin-left: auto;
  border-color: #c5d9f0;
}

.message-sender-preview {
  font-size: 0.75rem;
  color: #666;
  margin-bottom: 0.375rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.message-text-preview {
  color: #1a1a1a;
  font-size: 0.875rem;
  line-height: 1.5;
  font-weight: 400;
}

.page-header {
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-header h1 {
  font-size: 2.5rem;
  color: #333;
  margin-bottom: 0.5rem;
}

.page-header p {
  color: #666;
  font-size: 1.125rem;
}

.btn-post-new {
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: transform 0.3s, box-shadow 0.3s;
}

.btn-post-new:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

.messages-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid #e0e0e0;
}

.tab-button {
  padding: 1rem 2rem;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: #666;
  transition: all 0.3s;
}

.tab-button.active {
  color: #4FD1A5;
  border-bottom-color: #4FD1A5;
}

.tab-button:hover {
  color: #4FD1A5;
}

.messages-section {
  display: none;
}

.messages-section.active {
  display: block;
}

.messages-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.message-card {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s;
}

.message-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.message-card.unread {
  border-left: 4px solid #4FD1A5;
  background: #f0fdf4;
}

.message-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.message-sender {
  color: #111111;
  font-weight: 600;
}

.message-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  font-size: 0.875rem;
  color: #111111;
  opacity: 0.7;
}

.unread-badge {
  background: #4FD1A5;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.read-status {
  color: #999;
}

.message-listing {
  margin-bottom: 0.75rem;
  color: #111111;
  opacity: 0.7;
}

.listing-link {
  color: #4FD1A5;
  text-decoration: none;
  font-weight: 600;
}

.listing-link:hover {
  text-decoration: underline;
  color: #4FD1A5;
}

.seller-link {
  color: #374151;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.seller-link:hover {
  color: #1f2937;
  text-decoration: underline;
}

/* Header Avatar */
.header-avatar-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-account-verified .header-avatar-placeholder {
  background: linear-gradient(135deg, #fef9e7 0%, #f4e4a6 100%);
  color: #7c5a03;
  border: 2px solid #D4AF37;
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.3);
}
.header-account-verified .header-avatar {
  border: 2px solid #D4AF37;
  box-shadow: 0 2px 6px rgba(212, 175, 55, 0.4);
}
.header-account-verified .header-greeting {
  color: #B8860B;
  font-weight: 700;
}

.header-avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #D1FAE5;
  color: #4FD1A5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0;
  height: 40px;
  min-width: 100px;
  padding: 0 1.25rem;
  box-sizing: border-box;
  border-radius: 6px;
  transition: background-color 0.1s ease, color 0.1s ease;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #2B2F33;
  white-space: nowrap;
}

.dropdown-toggle:hover {
  background-color: #F7F9FB;
}

.header-greeting {
  white-space: nowrap;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #2B2F33;
}

.dropdown-arrow {
  font-size: 0.75rem;
  margin-left: 0.25rem;
  color: #2B2F33;
}

/* Messages Icon in Header - badge sits right next to icon */
.messages-icon-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem !important;
  gap: 4px;
}

.messages-icon {
  width: 18px;
  height: 18px;
  color: #2B2F33;
  transition: color 0.3s;
  flex-shrink: 0;
}

.messages-icon-link:hover .messages-icon {
  color: #4FD1A5;
}

.messages-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background-color: #EF4444;
  color: white;
  border-radius: 9px;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
  border: 2px solid white;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
  margin-top: -6px;
}

/* Profile Picture Upload Section */
.profile-picture-section {
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  background: #F7F9FB;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}

.profile-picture-label {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: #2B2F33;
  margin-bottom: 1rem;
}

.profile-picture-container {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.profile-picture-preview {
  flex-shrink: 0;
}

.profile-picture-image {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.profile-picture-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #4FD1A5;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.profile-picture-upload {
  flex: 1;
  min-width: 180px;
}

.file-input-hidden {
  display: none;
}

.file-input-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: #4FD1A5;
  color: white;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 2px 6px rgba(79, 209, 165, 0.3);
  border: none;
  font-size: 0.9375rem;
}

.file-input-label:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(79, 209, 165, 0.4);
  background: #4FD1A5;
}

.upload-icon {
  font-size: 1.125rem;
}

.upload-text {
  font-size: 0.9375rem;
}

.upload-hint {
  display: block;
  margin-top: 0.375rem;
  color: #5F6368;
  font-size: 0.8125rem;
}

@media (max-width: 768px) {
  .profile-picture-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profile-picture-upload {
    width: 100%;
  }
}

/* User Profile Page */
.user-profile-page {
  padding: 2rem 0;
  background: #F7F9FB;
  min-height: 100vh;
}

.profile-header {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  gap: 2rem;
  align-items: center;
}

.profile-avatar {
  flex-shrink: 0;
}

.avatar-placeholder {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: #4FD1A5;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 700;
}

.avatar-image {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.avatar-image-small {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.profile-info h1 {
  font-size: 2rem;
  color: #2B2F33;
  margin-bottom: 0.5rem;
}

.profile-name-rating {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.user-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stars {
  display: flex;
  gap: 2px;
}

.star {
  color: #ddd;
  font-size: 1.25rem;
  line-height: 1;
}

.star.filled {
  color: #FFD700;
}

.star.half {
  color: #FFD700;
  opacity: 0.5;
}

.rating-text {
  font-size: 0.9375rem;
  color: #5F6368;
  font-weight: 500;
}

.profile-location,
.profile-phone {
  color: #5F6368;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.profile-joined {
  color: #999;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.profile-stats {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
}

.stat-item {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
  min-width: 150px;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: #4FD1A5;
  margin-bottom: 0.5rem;
}

.stat-label {
  color: #111111;
  font-size: 0.875rem;
  opacity: 0.7;
}

/* Reviews Section */
.review-section,
.reviews-section {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.review-section h2,
.reviews-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: #111111;
}

.review-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.review-rating {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.review-rating label {
  font-weight: 600;
  color: #2B2F33;
}

.star-rating {
  display: flex;
  gap: 4px;
  justify-content: flex-start;
}

.star-input {
  display: none;
}

.star-label {
  font-size: 2rem;
  color: #ddd;
  cursor: pointer;
  transition: color 0.2s;
  user-select: none;
  display: inline-block;
}

/* Hover effect - fill stars from left to right */
.star-label:hover,
.star-label:hover~.star-label {
  color: #FFD700;
}

/* When a star is checked, fill it and all stars after it */
.star-input:checked~.star-label {
  color: #FFD700;
}

.star-input:checked+.star-label {
  color: #FFD700;
}

.review-comment-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.review-comment-field label {
  font-weight: 600;
  color: #2B2F33;
}

.review-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.9375rem;
  resize: vertical;
  min-height: 100px;
}

.review-textarea:focus {
  outline: none;
  border-color: #4FD1A5;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.btn-submit-review {
  background-color: #4FD1A5;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  align-self: flex-start;
}

.btn-submit-review:hover {
  background-color: #4FD1A5;
}

.existing-review {
  padding: 1rem;
  background: #f5f5f5;
  border-radius: 6px;
  border-left: 4px solid #4FD1A5;
}

.existing-review p {
  margin-bottom: 0.5rem;
  color: #5F6368;
}

.review-display {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.review-comment {
  color: #2B2F33;
  line-height: 1.6;
  margin: 0;
}

.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.review-item {
  padding: 1.5rem;
  background: #f9f9f9;
  border-radius: 6px;
  border-left: 4px solid #4FD1A5;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.reviewer-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.reviewer-info strong {
  color: #2B2F33;
  font-size: 1rem;
}

.review-date {
  font-size: 0.8125rem;
  color: #5F6368;
}

.profile-listings {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.profile-listings h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: #111111;
}

.message-content {
  color: #111111;
  line-height: 1.6;
  margin-bottom: 1rem;
  opacity: 0.8;
}

.message-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-view-message,
.btn-view-listing,
.btn-reply {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.3s;
}

.btn-view-message {
  background: #4FD1A5;
  color: white;
}

.btn-view-message:hover {
  background: #4FD1A5;
}

.btn-view-listing {
  background: #e0e0e0;
  color: #111111;
}

.btn-view-listing:hover {
  background: #d0d0d0;
}

.btn-reply {
  background: #4FD1A5;
  color: white;
}

.btn-reply:hover {
  background: #4FD1A5;
}

/* ========================================
   Modern Professional Chat System
   ======================================== */

/* Chat Page Container */
/* WhatsApp-style Layout */
.whatsapp-layout {
  display: flex;
  height: calc(100vh - 80px);
  min-height: 600px;
  background: #f0f2f5;
  max-width: 1600px;
  margin: 0 auto;
  position: relative;
}

/* Left Panel: Conversations */
.conversations-panel {
  width: 35%;
  min-width: 300px;
  max-width: 450px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #e6e6e6;
}

.conversations-header {
  background: #f0f2f5;
  padding: 10px 16px;
  border-bottom: 1px solid #e6e6e6;
}

.conversations-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.conversations-title {
  font-size: 20px;
  font-weight: 600;
  color: #111b21;
}

.conversations-actions {
  display: flex;
  gap: 8px;
}

.icon-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #54656f;
  transition: background-color 0.2s;
}

.icon-button:hover {
  background-color: #e9edef;
}

.conversations-search {
  padding: 8px 12px;
  background: #ffffff;
  border-bottom: 1px solid #e6e6e6;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f0f2f5;
  border-radius: 8px;
  padding: 8px 12px;
}

.search-box svg {
  color: #54656f;
  flex-shrink: 0;
}

.search-box input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  color: #111b21;
}

.search-box input::placeholder {
  color: #667781;
}

.conversations-list {
  flex: 1;
  overflow-y: auto;
  background: #ffffff;
}

.conversation-item-wrapper {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #e6e6e6;
  position: relative;
}

.conversation-item-wrapper:hover {
  background-color: #f5f6f6;
}

.conversation-item-wrapper.active {
  background-color: #e9edef;
}

.conversation-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  text-decoration: none;
  color: inherit;
  flex: 1;
  cursor: pointer;
}

.delete-conversation-button {
  background: none;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  color: #667781;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background-color 0.2s;
  opacity: 0;
  margin-right: 8px;
}

.conversation-item-wrapper:hover .delete-conversation-button {
  opacity: 1;
}

.delete-conversation-button:hover {
  color: #e53e3e;
  background-color: #fee;
  border-radius: 4px;
}

.conversation-avatar {
  width: 49px;
  height: 49px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  background: #e1e4e8;
}

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

.avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #54656f;
  background: #e1e4e8;
}

.conversation-info {
  flex: 1;
  min-width: 0;
}

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

.conversation-name {
  font-size: 17px;
  font-weight: 500;
  color: #111b21;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conversation-time {
  font-size: 12px;
  color: #667781;
  white-space: nowrap;
  margin-left: 8px;
}

.conversation-listing-name {
  font-size: 13px;
  color: #667781;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conversation-preview-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.conversation-preview {
  font-size: 14px;
  color: #667781;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.unread-badge {
  background: #25d366;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.conversation-item-wrapper.has-unread .conversation-name {
  font-weight: 600;
}

.conversation-item-wrapper.has-unread .conversation-preview {
  color: #111b21;
  font-weight: 500;
}

.empty-conversations {
  padding: 40px 20px;
  text-align: center;
  color: #667781;
}

.empty-conversations p {
  margin: 8px 0;
}

/* Right Panel: Chat */
.chat-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #efeae2;
  position: relative;
}

.empty-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #667781;
  padding: 40px;
  text-align: center;
}

.empty-chat-icon {
  color: #c4c9cc;
  margin-bottom: 24px;
}

.empty-chat h2 {
  font-size: 24px;
  font-weight: 300;
  color: #41525d;
  margin: 0 0 8px 0;
}

.empty-chat p {
  font-size: 14px;
  color: #667781;
  margin: 0;
}

/* Chat container */
.chat-shell {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #f5f2ee;
}

/* Header */
.chat-header {
  background: #fff;
  padding: 14px 24px;
  border-bottom: 1px solid #e6e6e6;
}

.chat-header .left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-back-button {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-right: 8px;
  color: #54656f;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  border-radius: 50%;
  transition: background-color 0.2s;
  flex-shrink: 0;
}

.chat-back-button:hover {
  background-color: #f0f2f5;
  color: #111b21;
}

.chat-back-button:active {
  background-color: #e4e6e9;
}

.chat-back-button svg {
  width: 20px;
  height: 20px;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e1e4e8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  flex-shrink: 0;
  overflow: hidden;
}

.chat-avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.name-link {
  text-decoration: none;
  display: inline-block;
}

.name-link:hover .name {
  text-decoration: underline;
  color: #4FD1A5;
}

.name {
  font-weight: 600;
  font-size: 16px;
  color: #111b21;
  margin-bottom: 2px;
  transition: color 0.2s;
  cursor: pointer;
}

.subtitle {
  font-size: 13px;
  color: #667781;
  line-height: 1.3;
}

.chat-header-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.chat-back-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #65676b;
  text-decoration: none;
  transition: background-color 0.2s;
  flex-shrink: 0;
}

.chat-back-button:hover {
  background-color: #f0f2f5;
  color: #050505;
}

.chat-header-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  background: #e4e6eb;
}

.chat-avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: #65676b;
  background: #e4e6eb;
}

.chat-header-info {
  flex: 1;
  min-width: 0;
}

.chat-user-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #050505;
  margin: 0;
  line-height: 1.3333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-user-status {
  font-size: 0.8125rem;
  color: #65676b;
  margin: 0;
  line-height: 1.3333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-listing-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #65676b;
  text-decoration: none;
  transition: background-color 0.2s;
  flex-shrink: 0;
}

.chat-listing-link:hover {
  background-color: #f0f2f5;
  color: #050505;
}

/* Messages area */
.chat-body {
  flex: 1;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  scroll-behavior: smooth;
}

/* Date Separator */
.chat-date-separator {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1rem 0;
  position: relative;
}

.chat-date-separator::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(0, 0, 0, 0.1);
}

.chat-date-text {
  background: #efeae2;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  color: #65676b;
  font-weight: 500;
  position: relative;
  z-index: 1;
  border-radius: 12px;
}

/* Message wrapper */
.message {
  display: flex;
}

.message.outgoing {
  justify-content: flex-end;
}

.message.incoming {
  justify-content: flex-start;
}

/* Bubble */
.bubble {
  max-width: 60%;
  padding: 10px 12px;
  border-radius: 14px;
  display: inline-flex;
  align-items: flex-end;
  gap: 8px;
  line-height: 1.3;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.outgoing .bubble {
  background: #dcf8c6;
  border-bottom-right-radius: 4px;
}

.outgoing .bubble .text {
  color: rgba(0, 0, 0, 1);
}

.incoming .bubble {
  background: #ffffff;
  border-bottom-left-radius: 4px;
}

.incoming .bubble .text {
  color: rgba(0, 0, 0, 1);
}

/* Text & time */
.text {
  font-size: 15px;
  color: rgba(0, 0, 0, 1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.time {
  font-size: 11px;
  color: #777;
  white-space: nowrap;
  margin-bottom: 1px;
}

/* Typing Indicator */
.typing-bubble {
  background: #ffffff;
  padding: 0.75rem 1rem;
  border-radius: 7.5px;
  border-bottom-left-radius: 4px;
}

.typing-dots {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.typing-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #65676b;
  animation: typingDot 1.4s infinite;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingDot {

  0%,
  60%,
  100% {
    opacity: 0.3;
    transform: scale(0.8);
  }

  30% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Empty State */
.chat-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  text-align: center;
  min-height: 400px;
}

.chat-empty-icon {
  color: #b8bcc1;
  margin-bottom: 1rem;
}

.chat-empty-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #050505;
  margin: 0 0 0.5rem 0;
}

.chat-empty-text {
  font-size: 0.9375rem;
  color: #65676b;
  margin: 0;
  max-width: 400px;
}

/* === Input bar === */
/* Input bar */
.chat-input {
  background: #fff;
  padding: 12px 24px;
  border-top: 1px solid #e6e6e6;
  display: flex;
  gap: 12px;
}

.chat-input input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 20px;
  border: 1px solid #ddd;
  font-size: 14px;
}

.chat-input button {
  padding: 0 18px;
  border-radius: 20px;
  border: none;
  background: #4caf50;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.message-detail-header {
  margin-bottom: 2rem;
}

.message-detail-header h1 {
  font-size: 2rem;
  color: #333;
  margin-top: 1rem;
}

.message-detail-card {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  max-width: 800px;
  margin: 0 auto;
}

.message-detail-info {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e0e0e0;
}

.info-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: center;
}

.info-row strong {
  min-width: 120px;
  color: #333;
}

.info-row span {
  color: #666;
}

.message-detail-content h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #333;
}

.message-text {
  background: #f9f9f9;
  padding: 1.5rem;
  border-radius: 6px;
  line-height: 1.8;
  color: #333;
  white-space: pre-wrap;
}

.message-detail-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* My Listings Page */
.free-boosts-banner {
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #fefce8 0%, #fef9e7 50%, #f4e4a6 100%);
  border: 1px solid #D4AF37;
  border-radius: 8px;
  font-size: 0.9375rem;
  color: #374151;
}
.free-boosts-banner-label { font-weight: 500; }
.free-boosts-banner-count { font-weight: 700; color: #7c5a03; margin: 0 0.25rem 0 0.35rem; }
.free-boosts-banner-reset { color: #6b7280; font-size: 0.875rem; }

.profile-free-boosts {
  margin: 0.5rem 0 0 0;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(135deg, #fefce8 0%, #fef9e7 100%);
  border: 1px solid #D4AF37;
  border-radius: 6px;
  font-size: 0.9375rem;
  color: #374151;
  display: inline-block;
}

.dropdown-item-free-boosts {
  list-style: none;
  padding: 0.6rem 1.5rem;
  font-size: 0.875rem;
  color: #6b7280;
  cursor: default;
}
.dropdown-item-free-boosts strong {
  color: #B8860B;
}

.dropdown-item-subtle {
  font-size: 0.8125rem;
  color: #6b7280;
  font-weight: normal;
}
.dropdown-item-subtle:hover {
  background-color: #f9fafb;
  color: #374151;
}

.my-listings-page {
  padding: 2rem 0;
  background: #f5f5f5;
  min-height: 100vh;
}

.my-listings-page .listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.my-listings-page .listing-card {
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
  transition: box-shadow 0.2s, transform 0.2s;
}

.my-listings-page .listing-card:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.my-listings-page .listing-card .listing-image {
  aspect-ratio: 4 / 3;
  background: #f3f4f6;
}

.my-listings-page .listing-card .listing-content {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.my-listings-page .listing-card .listing-boosted-time {
  margin-bottom: 0.35rem;
}
.my-listings-page .listing-card .listing-title {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  line-height: 1.35;
}

.my-listings-page .listing-card .listing-link {
  color: #2B2F33;
}

.my-listings-page .listing-card .listing-link:hover {
  color: #4FD1A5;
}

.my-listings-page .listing-card .listing-location {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 0.75rem;
}

.my-listings-page .listing-card .listing-footer {
  margin-top: auto;
  padding-top: 0.875rem;
  border-top: 1px solid #e5e7eb;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.my-listings-page .listing-card .listing-price {
  font-size: 1.125rem;
  font-weight: 700;
  color: #111827;
}

.my-listings-page .listing-card .listing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-end;
}

.btn-edit-small {
  padding: 0.5rem 1rem;
  background: #f9fafb;
  color: #5F6368;
  border: 1px solid #d1d5db;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn-edit-small:hover {
  background: #f3f4f6;
  color: #2B2F33;
  border-color: #9ca3af;
}

.btn-contact {
  padding: 0.75rem 1.5rem;
  background: #4caf50;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: background-color 0.3s;
  display: inline-block;
}

.btn-contact:hover {
  background: #45a049;
}

/* Category Details */
.category-details {
  margin: 2rem 0;
  padding: 1.5rem;
  background: #f9f9f9;
  border-radius: 8px;
  border-left: 4px solid #667eea;
}

.category-details h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #333;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.detail-item strong {
  color: #666;
  font-size: 0.875rem;
  font-weight: 600;
}

.detail-item span {
  color: #333;
  font-size: 1rem;
}

/* Form Row for side-by-side fields */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Message Form Page */
.message-form-page {
  padding: 2rem 0;
  background: #f5f5f5;
  min-height: 100vh;
}

.message-form-header {
  max-width: 800px;
  margin: 0 auto 2rem;
  padding: 0 1.5rem;
}

.message-form-header h1 {
  font-size: 2rem;
  color: #333;
  margin: 1rem 0 0.5rem;
}

.message-form-header p {
  color: #666;
  font-size: 1.125rem;
}

.message-form-card {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.listing-preview {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #f9f9f9;
  border-radius: 6px;
  border-left: 4px solid #667eea;
}

.listing-preview h3 {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  color: #333;
}

.preview-content {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.preview-image {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 6px;
}

.preview-details {
  flex: 1;
}

.preview-details strong {
  display: block;
  font-size: 1.125rem;
  color: #333;
  margin-bottom: 0.5rem;
}

.preview-details p {
  font-size: 1.25rem;
  color: #667eea;
  font-weight: 700;
}

.message-form .form-field textarea {
  width: 100%;
  padding: 0.875rem;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.3s;
}

.message-form .form-field textarea:focus {
  outline: none;
  border-color: #667eea;
}

/* Responsive for listing detail */
@media (max-width: 968px) {
  .homepage-main-content {
    grid-template-columns: 1fr;
  }

  .sell-box {
    position: static;
    margin-top: 2rem;
  }

  .categories-row {
    gap: 2rem;
    align-items: flex-start;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    justify-items: center;
  }

  .category-icon-item {
    justify-content: flex-start;
  }

  .category-icon-large {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    min-width: 50px;
    min-height: 50px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .listing-detail-container {
    padding: 0 1rem;
  }

  .listing-main-content {
    flex-direction: column;
    gap: 1.5rem;
  }

  .listing-images-section {
    max-width: 100%;
  }

  .image-gallery-container {
    flex-direction: column;
    width: 100%;
  }

  .thumbnail-images-sidebar {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1rem;
  }

  .thumbnail-image {
    width: 80px;
    height: 80px;
  }

  .listing-main-image {
    max-height: 400px;
    max-width: 100%;
  }

  .main-image {
    max-width: 100%;
  }

  .seller-info-card {
    width: 100%;
    padding: 1rem;
    margin-left: 0;
  }

  .seller-stats {
    flex-direction: column;
    gap: 0.75rem;
  }

  .image-placeholder-large {
    height: 300px;
  }

  .dropdown-menu {
    right: auto;
    left: 0;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Messages Layout - Mobile */
  .whatsapp-layout {
    flex-direction: column;
    height: calc(100vh - 60px);
    min-height: auto;
  }

  .conversations-panel {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    height: 100%;
    display: flex;
  }

  /* Hide empty chat panel on mobile */
  .chat-panel .empty-chat {
    display: none;
  }

  /* Show chat panel full screen when it has chat content */
  .chat-panel .chat-shell {
    width: 100%;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    background: #efeae2;
    display: flex;
    flex-direction: column;
    padding-bottom: 0;
    /* Remove any padding to allow input to sit at bottom */
  }

  /* Hide conversations panel when chat is open (has chat-shell) */
  .chat-panel:has(.chat-shell)~.conversations-panel,
  .whatsapp-layout:has(.chat-panel .chat-shell) .conversations-panel {
    display: none;
  }

  /* Show back button on mobile */
  .chat-back-button {
    display: flex;
  }

  .chat-container {
    height: 100vh;
  }

  .chat-header {
    padding: 0.75rem 1rem;
  }

  .chat-header-content {
    gap: 0.75rem;
  }

  .chat-avatar {
    width: 36px;
    height: 36px;
  }

  .chat-user-name {
    font-size: 0.875rem;
  }

  .chat-user-status {
    font-size: 0.75rem;
  }

  .chat-body {
    padding: 16px;
    gap: 12px;
    padding-bottom: 120px;
    /* Add space for input box (positioned higher) so messages don't get hidden */
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* Smooth scrolling on iOS */
    -webkit-overflow-scrolling: touch;
    /* Smooth scrolling on iOS */
  }

  .bubble {
    max-width: 75%;
  }

  .message-text {
    font-size: 0.875rem;
  }

  .chat-input {
    position: fixed;
    bottom: 10px;
    /* Position slightly higher from bottom */
    left: 0;
    right: 0;
    padding: 12px 16px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid #e6e6e6;
    border-radius: 12px 12px 0 0;
    z-index: 10;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
    transition: bottom 0.3s ease, transform 0.3s ease;
  }

  /* When input is focused, move it up more */
  .chat-input:has(input:focus) {
    bottom: 0;
    transform: translateY(0);
  }

  .chat-input input {
    padding: 12px 16px;
    font-size: 16px;
    /* Prevent zoom on iOS */
    border-radius: 24px;
    border: 1px solid #ddd;
    transition: border-color 0.2s;
  }

  .chat-input input:focus {
    outline: none;
    border-color: #4FD1A5;
    box-shadow: 0 0 0 2px rgba(79, 209, 165, 0.1);
  }

  .chat-input button,
  .chat-input .send-button {
    padding: 10px 20px;
    font-size: 14px;
    min-width: 60px;
  }

  .chat-input-container {
    padding: 0.625rem 0.75rem;
  }

  .chat-input-field-wrapper {
    min-height: 36px;
    padding: 0.375rem 0.75rem;
  }

  .chat-send-button {
    width: 36px;
    height: 36px;
  }

  .chat-send-button svg {
    width: 18px;
    height: 18px;
  }
}

/* ============================================
   COMPREHENSIVE MOBILE RESPONSIVE STYLES
   ============================================ */

@media (max-width: 768px) {

  /* Header and Logo */
  .main-header {
    max-height: 80px;
    padding: 0 0.75rem 0 0.5rem;
    /* bring logo and actions slightly left */
    display: flex;
    align-items: center;
    /* vertically center logo + actions */
    justify-content: space-between;
    position: relative;
    gap: 0.5rem;
    padding-top: 0;
  }

  .header-container {
    flex-direction: row;
    padding: 0.25rem 0;
    gap: 0.5rem;
    align-items: center;
    height: 80px;
    flex: 1;
  }

  .header-left {
    margin-left: -0.25rem;
    /* nudge logo further left */
    padding-left: 0;
    flex-shrink: 1;
    min-width: 0;
    height: 80px;
    padding: 0;
    margin: 0;
  }

  .logo {
    height: 80px;
    padding: 0;
    margin: 0;
  }

  .logo-link {
    padding: 0;
    margin: 0;
  }

  .logo-image {
    height: 80px;
    width: auto;
    margin: 0;
  }

  .back-nav-btn {
    padding: 0.375rem 0.5rem;
    font-size: 0.875rem;
    margin-right: 0.25rem;
  }

  /* Hamburger Menu - Now in header-right, handled by .header-right .hamburger-menu-btn */

  /* Navigation - Hide on mobile */
  .main-nav {
    display: none;
  }

  /* Mobile Menu - Show on mobile */
  .mobile-menu {
    display: block;
  }

  .mobile-menu-overlay {
    display: block;
  }

  .header-right {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    justify-content: flex-end;
    align-self: center;
    /* Vertically center the whole action zone in the header */
    margin-right: 0.25rem;
    /* shift Place Ad + hamburger slightly left from the edge */
  }

  /* Place Ad button in header-right on mobile */
  body.home-page .header-right .btn-place-ad {
    display: inline-flex !important;
    padding: 0 0.5rem !important;
    font-size: 0.75rem !important;
    height: 28px !important;
    margin-top: 27px !important;
    min-width: 55px !important;
    max-width: 65px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    flex-shrink: 0;
    order: 0;
    margin-left: 0;
    background-color: #4FD1A5 !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1.2 !important;
    vertical-align: middle !important;
  }

  /* Hide the fixed-header Place Ad button on all non-home mobile pages */
  body:not(.home-page) .header-right .btn-place-ad {
    display: none !important;
  }

  .header-right .dropdown {
    display: none;
  }

  .header-right .auth-buttons {
    display: none;
  }

  /* Hamburger now in header-right */
  .header-right .hamburger-menu-btn {
    display: flex !important;
    flex-shrink: 0;
    order: 1;
    /* Hamburger second, to the right of Place Ad */
    width: 20px;
    /* narrower from left & right */
    height: 20px;
    /* shorter top & bottom */
  }

  /* Make the mobile hamburger icon a bit slimmer */
  .hamburger-menu-btn .hamburger-line {
    height: 2px;
  }

  /* Account Dropdown */
  .account-dropdown-menu {
    right: 0;
    left: auto;
    min-width: 200px;
  }

  /* Hero Section */
  .hero-section {
    padding: 2rem 0;
    min-height: 300px;
  }

  .hero-title {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
  }

  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  .search-input-group,
  .search-input-group-results {
    flex-direction: column;
    padding: 0.5rem;
    gap: 0.5rem;
  }

  .search-input {
    padding: 0.875rem 1rem;
    font-size: 1rem;
  }

  /* Add separator line between search and location inputs on mobile homepage */
  .search-input-group .search-input:first-of-type {
    border-bottom: 1px solid #E0E0E0;
    padding-bottom: 0.875rem;
    margin-bottom: 0.5rem;
  }

  .location-input {
    max-width: 100%;
  }

  .search-button {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    width: 100%;
  }

  /* Search Results Header - compact, listings-first */
  .search-results-header {
    padding: 0.25rem 0 0.35rem;
  }

  .search-results-header .breadcrumbs {
    margin-bottom: 0.35rem;
    padding: 0.15rem 0;
  }

  .search-results-header .breadcrumbs-list {
    font-size: 0.8125rem;
    gap: 0.2rem;
  }

  .search-results-header .section-header {
    margin-bottom: 0.25rem;
  }

  .search-results-header .section-title {
    font-size: 1.25rem;
    font-weight: 700;
    padding: 0 1rem;
    margin: 0;
  }

  .search-box-results {
    padding: 0 1rem;
    display: none;
    /* Hide top search box on mobile */
  }
  .show-filters-row--desktop {
    display: none !important;
  }

  /* Mobile Search Bar - compact, ≤35–40% viewport */
  .mobile-search-bar {
    display: block;
    padding: 0 1rem 0.25rem;
    margin-top: 0.25rem;
    max-width: 100%;
    overflow: hidden;
  }

  .mobile-search-stack {
    width: 100%;
    max-width: 100%;
    gap: 0.25rem;
  }

  .mobile-search-stack .mobile-search-input-wrapper {
    width: 100%;
    max-width: 100%;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 0.3rem 0.5rem;
  }

  .mobile-search-stack .mobile-search-input {
    padding: 0.4rem 0;
    font-size: 0.9375rem;
    min-height: 0;
  }

  .mobile-search-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    background: #4FD1A5;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-search-submit-btn:hover {
    background: #4FD1A5;
  }

  .mobile-search-submit-btn svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
  }

  .mobile-search-input-wrapper {
    padding: 0.3rem 0.5rem;
    align-items: center;
  }

  .mobile-search-input {
    padding: 0.4rem 0;
    font-size: 0.9375rem;
    min-height: 0;
  }

  /* Filters button - lightweight, not main content */
  .filters-button-container-mobile {
    padding: 0.25rem 1rem 0.35rem;
  }

  .filters-button-container-mobile .container {
    padding: 0;
  }

  .btn-mobile-filters {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 5px;
  }

  /* Single row: [Search + icon] [Filters] — location and full-width Search hidden */
  .mobile-search-row-with-filters {
    display: flex;
    align-items: stretch;
    gap: 0.35rem;
    margin-top: 0.2rem;
  }

  .mobile-search-row-with-filters .mobile-search-bar {
    flex: 1;
    min-width: 0;
    margin-top: 0;
    padding: 0;
  }

  .mobile-search-row-with-filters .mobile-search-stack {
    display: block;
    gap: 0;
  }

  .mobile-search-main-row {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 0.3rem 0.5rem;
    background: #fff;
  }

  .mobile-search-main-row .mobile-search-input {
    flex: 1;
    min-width: 0;
    padding: 0.4rem 0;
    border: none;
    background: transparent;
  }

  .mobile-search-main-row .mobile-search-inline-btn {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-search-location-row,
  .mobile-search-full-width-btn {
    display: none !important;
  }

  .btn-mobile-filters-inline {
    flex-shrink: 0;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    width: auto;
  }

  .filters-button-container-mobile-hidden {
    display: none !important;
  }

  /* Category: dropdown on mobile, hide radio grid */
  .category-filter-dropdown-mobile {
    display: block;
  }

  .category-filter-grid-desktop {
    display: none !important;
  }

  /* General Filter Section */
  .general-filter-section {
    padding: 1rem 0;
  }

  .general-filter-box {
    padding: 1rem;
    margin: 0 1rem;
  }

  .general-filter-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .general-filter-input,
  .general-filter-select {
    padding: 0.75rem;
    font-size: 1rem;
  }

  .general-filter-button {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    width: 100%;
    max-width: 100%;
  }

  /* Listings Grid */
  .listings-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .listings-grid.homepage-grid {
    grid-template-columns: 1fr;
  }

  .listings-container {
    padding: 1rem;
  }

  .listings-header h1 {
    font-size: 1.5rem;
  }

  /* Listing Cards */
  .listing-card {
    padding: 1rem;
  }

  .listing-card-image {
    height: 200px;
  }

  .listing-card-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }

  .listing-card-price {
    font-size: 1.25rem;
  }

  .listing-card-location {
    font-size: 0.875rem;
  }

  /* Filters Button Container */
  .filters-button-container {
    padding: 0.5rem 0;
  }

  /* Car Filters */
  .car-filter-section {
    padding: 1rem 0;
  }

  .car-filter-box {
    padding: 1rem;
    margin: 0 1rem;
  }

  .car-filter-title {
    font-size: 1.125rem;
    margin-bottom: 1rem;
  }

  .car-filter-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .car-filter-input,
  .car-filter-select {
    padding: 0.75rem;
    font-size: 1rem;
  }

  .car-filter-button {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    width: 100%;
  }

  .btn-show-filters {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    width: 100%;
    max-width: 300px;
  }

  .btn-clear-car-filters {
    margin-left: 0;
    margin-top: 0.75rem;
    width: 100%;
    text-align: center;
  }

  .car-filter-form .form-actions {
    flex-direction: column;
    gap: 0.75rem;
  }

  /* Listing Detail Page */
  .listing-detail {
    padding: 1rem 0;
  }

  .listing-detail-container {
    padding: 0 1rem;
  }

  .listing-main-content {
    flex-direction: column;
    gap: 1rem;
  }

  .listing-images-section {
    padding: 1rem;
  }

  .image-gallery-container {
    flex-direction: column;
    gap: 1rem;
  }

  .thumbnail-images-sidebar {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.5rem;
    max-height: 120px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .thumbnail-image {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
  }

  .listing-main-image {
    max-height: 300px;
    width: 100%;
  }

  .main-image {
    width: 100%;
  }

  .seller-info-card {
    width: 100%;
    padding: 1rem;
    margin-left: 0;
  }

  .seller-stats {
    flex-direction: column;
    gap: 0.75rem;
  }

  /* Forms */
  .form-container {
    padding: 1rem;
    margin: 1rem;
  }

  .form-field {
    margin-bottom: 1rem;
  }

  .form-field label {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
  }

  .form-field input,
  .form-field textarea,
  .form-field select {
    padding: 0.75rem;
    font-size: 1rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .form-actions {
    flex-direction: column;
    gap: 0.75rem;
  }

  .form-actions .btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }

  /* Image Upload */
  .image-upload-area {
    padding: 1.5rem;
  }

  .image-preview-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .image-preview-item {
    aspect-ratio: 1;
  }

  /* Categories */
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .category-card {
    padding: 1rem;
  }

  .category-icon-large {
    font-size: 2rem;
    width: 50px;
    height: 50px;
  }

  /* Buttons - Ensure touch targets are at least 44x44px */
  .btn,
  button,
  .btn-primary,
  .btn-secondary {
    min-height: 44px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    touch-action: manipulation;
  }

  .btn-small {
    min-height: 36px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }

  /* Messages */
  .message-form-page {
    padding: 1rem 0;
  }

  .message-form-header {
    padding: 0 1rem;
  }

  .message-form-header h1 {
    font-size: 1.5rem;
  }

  .message-form-card {
    padding: 1rem;
    margin: 0 1rem;
  }

  .preview-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .preview-image {
    width: 80px;
    height: 80px;
  }

  /* Container and Spacing */
  .container {
    padding: 0 1rem;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .section-header h2 {
    font-size: 1.5rem;
  }

  /* Auth Pages */
  .auth-container {
    margin: 1rem;
    padding: 1.5rem;
  }

  .auth-container h1 {
    font-size: 1.75rem;
  }

  /* My Listings */
  .my-listings-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  /* Favorites */
  .favorites-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  /* Page Headers */
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .page-header h1 {
    font-size: 1.5rem;
  }
}

/* Extra Small Devices */
@media (max-width: 480px) {
  .header-container {
    padding: 0.5rem 0.75rem;
  }

  .logo-image {
    height: 80px;
  }

  .main-nav {
    gap: 0.25rem;
  }

  .nav-link {
    padding: 0.25rem 0.375rem;
    font-size: 0.8125rem;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .hero-subtitle {
    font-size: 0.875rem;
  }

  .listings-header h1 {
    font-size: 1.25rem;
  }

  .listing-card-title {
    font-size: 0.9375rem;
  }

  .listing-card-price {
    font-size: 1.125rem;
  }

  .car-filter-box {
    margin: 0 0.5rem;
    padding: 0.75rem;
  }

  .form-container {
    padding: 0.75rem;
    margin: 0.5rem;
  }

  .categories-grid {
    grid-template-columns: 1fr;
  }

  .image-preview-grid {
    grid-template-columns: 1fr;
  }
}