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

:root {
  --primary-color: #f68015;
  --secondary-color: #f8f9fa;
  --dark-bg: #1964b1;
  --darker-bg: #1965b1cf;
  --light-text: #333333;
  --lighter-text: #666666;
  --white: #ffffff;
  --gray: #999999;
  --light-gray: #e9ecef;
  --border-radius: 12px;
  --transition: all 0.3s ease;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--white);
  color: var(--light-text);
  line-height: 1.6;
}
.container-nav {
  margin: 0 auto;
  padding: 0 20px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navbar */
.navbar {
  background-color: var(--dark-bg);
  position: sticky;
  top: 0;
  padding: 1rem 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

.navbar.scrolled {
  padding: 0.5rem 0;
  background-color: #1964b1;
  backdrop-filter: blur(10px);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-right: 10%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--white);
  font-size: 1.5rem;
  font-weight: bold;
  transition: var(--transition);
}

.logo:hover {
  transform: translateY(-2px);
}

.logo-image {
  height: 100px;
  width: auto;
  object-fit: contain;
}

.logo-icon {
  font-size: 2rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--primary-color);
}

.nav-link:hover::after {
  width: 100%;
}

.admin-link {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: 6px;
}

.admin-link:hover {
  background-color: #c41a1f;
  transform: translateY(-2px);
}

.admin-link::after {
  display: none;
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-menu-btn span {
  width: 25px;
  height: 3px;
  background-color: var(--white);
  transition: var(--transition);
}

.mobile-menu {
  display: none;
  background-color: var(--dark-bg);
  padding: 1rem;
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  z-index: 999;
}

.mobile-menu.active {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: slideDown 0.3s ease;
}

.mobile-menu-link {
  color: var(--white);
  text-decoration: none;
  padding: 0.5rem;
  border-radius: 6px;
  transition: var(--transition);
}

.mobile-menu-link:hover {
  background-color: rgba(227, 30, 36, 0.1);
  color: var(--primary-color);
}

/* Messages */
.messages-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 1001;
  max-width: 400px;
}

.message {
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  border-radius: var(--border-radius);
  background-color: var(--white);
  border-left: 4px solid var(--primary-color);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  animation: slideInRight 0.3s ease;
}

.message-success {
  border-left-color: #10b981;
}

.message-error {
  border-left-color: #ef4444;
}

/* Hero Section */
.hero {
  padding: 6rem 0;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(227, 30, 36, 0.1) 0%, transparent 70%);
  animation: pulse 4s ease-in-out infinite;
}

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

.hero-title {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--light-text);
  font-weight: 700;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--lighter-text);
  margin-bottom: 2rem;
}

.search-form {
  display: flex;
  max-width: 600px;
  margin: 0 auto;
  gap: 1rem;
  background-color: var(--white);
  padding: 0.5rem;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.search-input {
  flex: 1;
  padding: 1rem;
  border: none;
  background-color: transparent;
  color: var(--light-text);
  font-size: 1rem;
  outline: none;
  transition: var(--transition);
  font-family: inherit;
}

.search-input::placeholder {
  color: var(--gray);
}

.search-btn {
  padding: 1rem 2rem;
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.search-btn:hover {
  background-color: #c41a1f;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(227, 30, 36, 0.3);
}

/* Categories Section */
.categories-section {
  padding: 4rem 0;
  background-color: var(--white);
}

.section-title {
  font-size: 2rem;
  margin-bottom: 2rem;
  text-align: center;
  color: var(--light-text);
}

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

/* Updated category card to have image on top, text on bottom */
.category-card {
  background-color: var(--white);
  border-radius: var(--border-radius);
  text-decoration: none;
  color: var(--light-text);
  transition: var(--transition);
  border: 2px solid var(--light-gray);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
  box-shadow: 0 8px 25px rgba(227, 30, 36, 0.15);
}

/* Image container covers full top section */
.category-image-container {
  width: 100%;
  height: 150px;
  overflow: hidden;
  flex-shrink: 0;
}

/* Image fills the container completely */
.category-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.category-card:hover .category-image {
  transform: scale(1.1);
}

/* Content section at bottom with text */
.category-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: center;
}

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

.category-name {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--light-text);
}

.category-count {
  font-size: 0.9rem;
  color: var(--gray);
}

/* Filter Section */
.filter-section {
  padding: 2rem 0;
  background-color: var(--secondary-color);
}

.filter-form {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-select,
.filter-input {
  padding: 0.75rem 1rem;
  border: 2px solid var(--light-gray);
  background-color: var(--white);
  color: var(--light-text);
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  transition: var(--transition);
}

.filter-select:focus,
.filter-input:focus {
  border-color: var(--primary-color);
}

.filter-btn {
  padding: 0.75rem 2rem;
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover {
  background-color: #c41a1f;
  transform: translateY(-2px);
}

/* Listings Section */
.listings-section {
  padding: 4rem 0;
  background-color: var(--white);
}

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

/* Updated listing card structure - image on top, info on bottom */
.listing-card {
  background-color: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--light-text);
  transition: var(--transition);
  border: 2px solid var(--light-gray);
  animation: fadeInUp 0.5s ease;
  display: flex;
  flex-direction: column;
}

.listing-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary-color);
  box-shadow: 0 12px 30px rgba(227, 30, 36, 0.15);
}

/* Image takes full top section of card */
.listing-image {
  position: relative;
  height: 220px;
  overflow: hidden;
  width: 100%;
  flex-shrink: 0;
}

.listing-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.listing-card:hover .listing-image img {
  transform: scale(1.1);
}

.listing-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: var(--primary-color);
  color: var(--white);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Content section takes bottom part with all info */
.listing-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex-grow: 1;
}

.listing-title {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
  color: var(--light-text);
  font-weight: 600;
  line-height: 1.4;
}

.listing-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--light-gray);
}

.no-results {
  text-align: center;
  padding: 4rem 0;
  color: var(--gray);
  font-size: 1.2rem;
}

/* Listing Detail */
.listing-detail-section {
  padding: 4rem 0;
  background-color: var(--white);
}

.breadcrumb {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  color: var(--gray);
  flex-wrap: wrap;
}

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

.breadcrumb a:hover {
  text-decoration: underline;
}

.listing-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

.listing-gallery {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.main-image-container {
  border-radius: var(--border-radius);
  overflow: hidden;
  background-color: var(--secondary-color);
}

.main-image {
  width: 100%;
  height: 500px;
  object-fit: contain;
  transition: opacity 0.3s ease;
}

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

.thumbnail {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
}

.thumbnail:hover,
.thumbnail.active {
  border-color: var(--primary-color);
  transform: scale(1.05);
}

.listing-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.listing-detail-title {
  font-size: 2rem;
  color: var(--light-text);
}

.listing-meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.meta-item {
  color: var(--gray);
  font-size: 0.95rem;
}

.listing-price-box {
  background-color: var(--secondary-color);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  border: 2px solid var(--primary-color);
}

.price-label {
  display: block;
  color: var(--gray);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.price-value {
  font-size: 2rem;
  font-weight: 700;
  color: darkblue;
}

.listing-category-badge {
  display: inline-block;
  background-color: var(--secondary-color);
  padding: 0.75rem 1.5rem;
  border-radius: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.category-badge-image {
  width: 24px;
  height: 24px;
  object-fit: cover;
  border-radius: 50%;
}

.listing-description {
  background-color: var(--secondary-color);
  padding: 1.5rem;
  border-radius: var(--border-radius);
}

.listing-description h3 {
  color: var(--light-text);
  margin-bottom: 1rem;
}

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

.btn {
  padding: 1rem 2rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

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

.btn-primary:hover {
  background-color: #c41a1f;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(227, 30, 36, 0.3);
}

.btn-secondary {
  background-color: #1964b1;
  color: var(--white);
}

.btn-secondary:hover {
  background-color: #0f4f8f;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(15, 79, 143, 0.25);
}

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

.btn-danger:hover {
  background-color: #b73232;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(214, 69, 69, 0.3);
}

.btn-link {
  background: none;
  border: none;
  color: var(--primary-color);
  padding: 0;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.btn-link:hover {
  color: #0f4f8f;
  transform: none;
  box-shadow: none;
}

.btn-full {
  width: 100%;
}

.related-section {
  margin-top: 4rem;
}

/* Contact Page */
.contact-section {
  padding: 4rem 0;
  background-color: var(--white);
  overflow-x: hidden; /* Prevent horizontal overflow */
}

.contact-header {
  text-align: center;
  margin-bottom: 3rem;
}

.page-title {
  font-size: 2.5rem;
  color: var(--light-text);
  margin-bottom: 1rem;
}

.page-subtitle {
  font-size: 1.1rem;
  color: var(--gray);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  width: 100%; /* Ensure grid doesn't exceed container */
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.info-card {
  background-color: var(--secondary-color);
  padding: 2rem;
  border-radius: var(--border-radius);
  text-align: center;
  transition: var(--transition);
  border: 2px solid transparent;
}

.info-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-5px);
}

.info-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.info-card h3 {
  color: var(--light-text);
  margin-bottom: 0.5rem;
}

.info-card p {
  color: var(--gray);
}

.contact-form-container {
  background-color: var(--secondary-color);
  padding: 2rem;
  border-radius: var(--border-radius);
  width: 100%; /* Prevent overflow */
  max-width: 100%; /* Ensure it stays within bounds */
}

.contact-form-box {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%; /* Ensure form doesn't overflow */
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%; /* Constrain form groups */
}

.form-group label {
  color: var(--light-text);
  font-weight: 600;
  word-wrap: break-word; /* Ensure labels wrap on mobile */
}

.form-input {
  padding: 0.75rem 1rem;
  border: 2px solid var(--light-gray);
  background-color: var(--white);
  color: var(--light-text);
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  transition: var(--transition);
  font-family: inherit;
  width: 100%; /* Ensure inputs fill container */
  max-width: 100%; /* Prevent overflow */
  box-sizing: border-box; /* Include padding in width calculation */
}

.error {
  color: #ff6b6b;
  font-size: 0.9rem;
}

/* About Page */
.about-section {
  padding: 4rem 0;
  background-color: var(--white);
}

.about-header {
  text-align: center;
  margin-bottom: 3rem;
}

.about-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.about-card {
  background-color: var(--secondary-color);
  padding: 2rem;
  border-radius: var(--border-radius);
  text-align: center;
  transition: var(--transition);
  border: 2px solid transparent;
}

.about-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-5px);
}

.about-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.about-text {
  background-color: var(--secondary-color);
  padding: 2rem;
  border-radius: var(--border-radius);
}

.about-text h2 {
  color: var(--light-text);
  margin-bottom: 1rem;
}

.about-text p {
  color: var(--lighter-text);
  margin-bottom: 1rem;
  line-height: 1.8;
}

/* Footer */
.footer {
  background-color: var(--dark-bg);
  padding: 3rem 0 1rem;
  margin-top: 4rem;
  border-top: 2px solid var(--darker-bg);
}

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

/* Added footer logo styling */
.footer-logo {
  height: 50px;
  width: auto;
  object-fit: contain;
  margin-bottom: 1rem;
}

.footer-section h3,
.footer-section h4 {
  color: var(--white);
  margin-bottom: 1rem;
}

.footer-section p {
  color: var(--light-gray);
}

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

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul li a {
  color: var(--light-gray);
  text-decoration: none;
  transition: var(--transition);
}

.footer-section ul li a:hover {
  color: var(--primary-color);
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.social-link {
  color: var(--light-gray);
  text-decoration: none;
  transition: var(--transition);
}

.social-link:hover {
  color: var(--primary-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--darker-bg);
  color: var(--light-gray);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

.fade-in {
  animation: fadeInUp 0.8s ease;
}
@media (max-width: 850px) {

  .footer-content{
    text-align: center;
    grid-template-columns: none;
  }
    .mobile-menu-btn {
    display: flex;
  }
    .nav-links {
    display: none;
  }
  .nav-content {
  display: flex !important;
  justify-content: center;
  align-items: center;
  margin-left: 10% !important;
}

}
/* Responsive Design */
@media (max-width: 768px) {
  /* Enhanced mobile navigation */
  .container {
    padding: 0 15px;
  }

  .nav-links {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .logo-image {
    height: 80px;
  }

  /* Better mobile hero section */
  .hero {
    padding: 3rem 0;
  }

  .hero-title {
    font-size: 2rem;
    line-height: 1.2;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .search-form {
    flex-direction: column;
    padding: 0.75rem;
  }

  .search-input {
    padding: 0.875rem;
  }

  .search-btn {
    padding: 0.875rem 1.5rem;
    width: 100%;
  }

  /* Mobile-optimized categories */
  .categories-section {
    padding: 2rem 0;
  }

  .section-title {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .category-image-container {
    height: 120px;
  }

  .category-content {
    padding: 1rem;
  }

  .category-name {
    font-size: 0.95rem;
  }

  .category-count {
    font-size: 0.85rem;
  }

  /* Mobile filter section */
  .filter-section {
    padding: 1.5rem 0;
  }

  .filter-form {
    flex-direction: column;
    gap: 0.75rem;
  }

  .filter-select,
  .filter-input {
    width: 100%;
    padding: 0.875rem;
  }

  .filter-btn {
    width: 100%;
    padding: 0.875rem;
  }

  /* Mobile listings grid */
  .listings-section {
    padding: 2rem 0;
  }

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

  .listing-image {
    height: 200px;
  }

  .listing-content {
    padding: 1.25rem;
  }

  .listing-title {
    font-size: 1rem;
  }

  .listing-price {
    font-size: 1.15rem;
  }

  /* Mobile listing detail page */
  .listing-detail-section {
    padding: 2rem 0;
  }

  .listing-detail-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .main-image {
    height: 300px;
  }

  .thumbnail-container {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
  }

  .thumbnail {
    height: 60px;
  }

  .listing-detail-title {
    font-size: 1.5rem;
  }

  .listing-meta {
    gap: 1rem;
  }

  .price-value {
    font-size: 1.75rem;
  }

  .listing-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    padding: 0.875rem;
  }

  /* Mobile contact page */
  .contact-section {
    padding: 2rem 0;
    overflow-x: hidden; /* Ensure no horizontal scroll on mobile */
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    width: 100%; /* Full width on mobile */
  }

  .page-title {
    font-size: 2rem;
    word-wrap: break-word; /* Wrap long titles */
    padding: 0 10px; /* Add padding to prevent edge touching */
  }

  .page-subtitle {
    font-size: 1rem;
    word-wrap: break-word; /* Wrap long subtitles */
    padding: 0 10px; /* Add padding */
  }

  .info-card {
    padding: 1.5rem;
    width: 100%; /* Full width on mobile */
    box-sizing: border-box; /* Include padding in width */
  }

  .info-card p {
    word-wrap: break-word; /* Wrap long text */
    overflow-wrap: break-word; /* Break long words */
  }

  .contact-form-container {
    padding: 1.5rem;
    width: 100%; /* Full width on mobile */
    box-sizing: border-box; /* Include padding in width */
  }

  .contact-form-box {
    width: 100%; /* Full width on mobile */
  }

  .form-group {
    width: 100%; /* Full width on mobile */
  }

  .form-input {
    padding: 0.875rem;
    width: 100%; /* Full width on mobile */
    font-size: 16px; /* Prevent zoom on iOS */
    box-sizing: border-box; /* Include padding in width */
  }

  .btn-full {
    width: 100%; /* Full width button on mobile */
    box-sizing: border-box; /* Include padding in width */
  }

  /* Mobile footer */
  .footer {
    padding: 2rem 0 1rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-logo {
    height: 60px;
  }

  /* Mobile messages */
  .messages-container {
    top: 70px;
    right: 10px;
    left: 10px;
    max-width: 100%;
  }

  .message {
    padding: 0.875rem 1rem;
  }

  /* Mobile about page */
  .about-section {
    padding: 2rem 0;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .about-card {
    padding: 1.5rem;
  }

  .about-text {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  /* Extra small mobile devices */
  .container {
    padding: 0 10px;
  }

  .logo-image {
    height: 60px;
  }

  .hero {
    padding: 2rem 0;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .page-title {
    font-size: 1.75rem;
    padding: 0 5px; /* Tighter padding on small screens */
  }

  .page-subtitle {
    font-size: 1rem;
  }

  .info-icon {
    font-size: 2.5rem;
  }

  .info-card {
    padding: 1rem; /* Reduce padding on very small screens */
  }

  .contact-form-container {
    padding: 1rem; /* Reduce padding on very small screens */
  }

  .form-input {
    padding: 0.75rem; /* Adjust padding for small screens */
  }

  .listing-image {
    height: 180px;
  }

  .main-image {
    height: 250px;
  }

  .thumbnail-container {
    grid-template-columns: repeat(3, 1fr);
  }

  .listing-detail-title {
    font-size: 1.25rem;
  }

  .price-value {
    font-size: 1.5rem;
  }
}

/* Landscape mobile optimization */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    padding: 2rem 0;
  }

  .main-image {
    height: 350px;
  }
}

/* Touch-friendly improvements for all mobile */
@media (hover: none) and (pointer: coarse) {
  .nav-link,
  .mobile-menu-link,
  .category-card,
  .listing-card,
  .btn,
  .search-btn,
  .filter-btn {
    -webkit-tap-highlight-color: rgba(227, 30, 36, 0.1);
  }

  .btn,
  .search-btn,
  .filter-btn {
    min-height: 44px;
  }

  .form-input,
  .filter-select,
  .filter-input {
    min-height: 44px;
    font-size: 16px; 
  }
}
