/* 
  OLX Clone - Premium Design
  Theme: Modern, Clean, Vibrant
*/

@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap");

:root {
  --primary-color: #002f34;
  --primary-hover: #00454d;
  --accent-color: #3258f1;
  --accent-hover: #2160eb;
  --secondary-color: #00a49f;
  --secondary-hover: #007c77;
  --background-color: #f2f4f5;
  --card-bg: #ffffff;
  --text-main: #002f34;
  --text-light: #526f73;
  --border-color: #d8dfe0;
  --success-color: #23e5db;
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
  --radius-md: 4px;
  --radius-lg: 8px;
  --radius-pill: 50px;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  width: 100%;
}

body {
  font-family: "Outfit", sans-serif;
  background-color: var(--background-color);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  position: relative;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* Header */
.header {
  background-color: var(--background-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 0 var(--border-color);
  transition: var(--transition);
  width: 100%;
}

.header.scrolled {
  box-shadow: var(--shadow-sm);
}

.navbar {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 72px;
  width: 100%;
}

.logo {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-color);
  letter-spacing: -1px;
  flex-shrink: 0;
}

/* Search Container */
.search-container {
  flex: 1;
  display: flex;
  align-items: center;
  max-width: 800px;
  gap: 1rem;
  min-width: 0; /* Allow flex item to shrink below its content size */
}

.search-location,
.search-bar {
  background: #fff;
  border: 2px solid var(--primary-color);
  border-radius: var(--radius-md);
  display: flex; /* Ensure these are flex containers */
  align-items: center;
  transition: var(--transition);
  height: 48px;
}

.search-location:focus-within,
.search-bar:focus-within {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 4px rgba(0, 164, 159, 0.1);
}

.search-location {
  flex-basis: 30%;
  min-width: 250px;
  padding: 0;
  gap: 0;
  position: relative;
  overflow: visible;
}

.search-bar {
  flex: 1;
  display: flex; /* Explicitly flex */
  align-items: center; /* Center items vertically */
  padding: 0; /* Remove padding to let button stretch */
  overflow: hidden; /* Ensure button doesn't overflow border radius */
  width: 100%;
}

.search-input {
  width: 100%;
  padding: 0 1rem;
  border: none;
  outline: none;
  font-size: 1rem;
  color: var(--text-main);
  background: transparent;
  height: 100%;
}

/* Styling untuk select dropdown di search location */
.search-location select.search-input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  padding: 0 2.5rem 0 2.75rem; /* Left padding untuk icon, right untuk chevron */
  flex: 1;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
  background: transparent;
  border: none;
  outline: none;
  transition: color 0.2s ease;
  width: 100%;
  height: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.search-location select.search-input:hover {
  color: var(--secondary-color);
}

.search-location select.search-input:focus {
  outline: none;
  color: var(--text-main);
}

.search-location select.search-input option {
  background: white;
  color: var(--text-main);
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  min-height: 2.5rem;
  display: flex;
  align-items: center;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.search-location select.search-input option:hover {
  background: var(--background-color);
  color: var(--secondary-color);
}

.search-location select.search-input option:checked {
  background: var(--secondary-color);
  color: white;
  font-weight: 600;
}

/* Styling untuk icon location */
.search-location .fa-location-dot {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-main);
  font-size: 1rem;
  z-index: 2;
  pointer-events: none;
  transition: color 0.2s ease;
}

.search-location:focus-within .fa-location-dot,
.search-location:hover .fa-location-dot {
  color: var(--secondary-color);
}

/* Styling untuk chevron icon */
.search-location .fa-chevron-down {
  position: absolute;
  right: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 0.75rem;
  z-index: 2;
  pointer-events: none;
  transition: transform 0.3s ease, color 0.2s ease;
}

.search-location:focus-within .fa-chevron-down {
  transform: translateY(-50%) rotate(180deg);
  color: var(--secondary-color);
}

.search-location:hover .fa-chevron-down {
  color: var(--text-main);
}

/* Search Button fix */
.search-btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  width: 48px;
  height: 48px; /* Match container height */
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  flex-shrink: 0; /* Prevent button from shrinking */
  margin: -2px -2px -2px 0; /* Compensate for parent border if needed, or better yet: */
  /* Remove the negative margin approach and instead ensure parent doesn't hold it back */
  border-radius: 0 var(--radius-md) var(--radius-md) 0; /* Match parent radius */
}

/* Refined approach for search bar to ensure seamless button */
.search-bar {
  padding-right: 0;
  border: 2px solid var(--primary-color); /* Add border to parent */
  /* If button is inside, it needs to cover the right side fully */
}

.search-btn:hover {
  background-color: var(--primary-hover);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-shrink: 0;
}

.nav-link {
  font-weight: 600;
  font-size: 1rem;
  color: var(--primary-color);
  position: relative;
  padding-bottom: 2px;
}

.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--primary-color);
  transition: width 0.3s;
}

.nav-link:hover::after {
  width: 100%;
}

.sell-btn {
  background: white;
  color: var(--primary-color);
  border: 4px solid #fff; /* Border trick for gradient border look - simplifed to shadow here */
  box-shadow: inset 0 0 0 2px var(--secondary-color); /* Inner border */
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.sell-btn .fa-plus {
  background: var(--secondary-color);
  color: white;
  border-radius: 50%;
  padding: 2px;
  font-size: 0.8rem;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.sell-btn:hover {
  box-shadow: inset 0 0 0 4px var(--secondary-color);
  transform: translateY(-1px);
}

.sell-btn:hover .fa-plus {
  transform: rotate(90deg);
}

/* Categories */
.categories-section {
  background: #fff;
  padding: 0.8rem 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  width: 100%;
}

.cat-nav {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.5rem;
  scrollbar-width: thin; /* Firefox - membuat scrollbar tipis */
  scrollbar-color: var(--border-color) transparent; /* Firefox - warna scrollbar */
  /* Menampilkan scrollbar untuk desktop */
}

/* Webkit scrollbar styling (Chrome, Safari, Edge) */
.cat-nav::-webkit-scrollbar {
  height: 8px; /* Tinggi scrollbar horizontal */
  display: block; /* Tampilkan scrollbar */
}

.cat-nav::-webkit-scrollbar-track {
  background: transparent; /* Track background */
  border-radius: 4px;
}

.cat-nav::-webkit-scrollbar-thumb {
  background-color: var(--border-color); /* Warna thumb */
  border-radius: 4px;
  transition: background-color 0.3s;
}

.cat-nav::-webkit-scrollbar-thumb:hover {
  background-color: var(--text-light); /* Warna thumb saat hover */
}

.cat-link {
  white-space: nowrap;
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0;
  opacity: 0.8;
}

.cat-link:hover {
  color: var(--secondary-color);
  opacity: 1;
}

/* Main Content */
.main-content {
  padding: 2rem 0 4rem;
  flex: 1;
  width: 100%;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-main);
}

/* Breadcrumb */
.breadcrumb {
  padding: 1rem 0 2rem;
  font-size: 0.9rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--text-light);
}

.breadcrumb a:hover {
  color: var(--secondary-color);
}

.breadcrumb i {
  font-size: 0.7rem;
  margin: 0 0.2rem;
}

.breadcrumb span {
  color: var(--text-main);
  font-weight: 500;
}

/* Detail Page Layout */
.detail-grid {
  display: grid;
  grid-template-columns: 2fr 1.2fr;
  gap: 2rem;
}

.detail-main {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Gallery */
.gallery-container {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 1rem;
  overflow: hidden;
}

.gallery-main-frame {
  position: relative;
  width: 100%;
  padding-top: 60%; /* 16:9 Aspect Ratio (approx) */
  background: #000;
  margin-bottom: 1rem;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.gallery-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain; /* Contain to show full image */
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.8);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-main);
  transition: var(--transition);
}

.gallery-nav.prev {
  left: 1rem;
}
.gallery-nav.next {
  right: 1rem;
}

.gallery-nav:hover {
  background: white;
  color: var(--secondary-color);
}

.gallery-thumbs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
}

.thumb {
  width: 80px;
  height: 60px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.7;
  transition: var(--transition);
}

.thumb.active {
  border-color: var(--secondary-color);
  opacity: 1;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Detail Content */
.detail-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2rem;
}

.detail-section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.detail-text {
  color: var(--text-main);
  line-height: 1.8;
  font-size: 1rem;
}

/* Sidebar Cards */
.sidebar-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.price-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.item-price {
  font-size: 2rem;
  font-weight: 800;
}

.item-actions {
  display: flex;
  gap: 0.5rem;
}

.action-icon-btn {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-main);
  transition: var(--transition);
}

.action-icon-btn:hover {
  color: var(--secondary-color);
}

.favorite-btn.active {
  color: #e74c3c;
}

.favorite-btn.active:hover {
  color: #c0392b;
}

.favorite-btn i {
  transition: var(--transition);
}

.favorite-btn:hover i {
  transform: scale(1.1);
}

.item-title {
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 1.5rem;
}

.item-meta-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-light);
}

.item-meta-info span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Seller Profile */
.section-label {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.seller-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.seller-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.seller-profile {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.seller-avatar {
  position: relative;
  width: 64px;
  height: 64px;
}

.seller-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.seller-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  background: var(--success-color);
  color: var(--primary-color);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  border: 2px solid white;
}

.seller-info h4 {
  font-size: 1.1rem;
  font-weight: 700;
}

.seller-join {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* Buttons */
.chat-btn,
.wa-btn {
  width: 100%;
  padding: 0.8rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition);
  margin-bottom: 0.8rem;
}

.chat-btn {
  background-color: var(--primary-color);
  color: white;
  border: 2px solid var(--primary-color);
}

.chat-btn:hover {
  background-color: var(--primary-hover);
}

.wa-btn {
  background-color: white;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.wa-btn:hover {
  background-color: #f0f7f7;
}

/* Map Placeholder */
.map-placeholder {
  width: 100%;
  height: 120px;
  background-color: #e0e0e0;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.location-detail strong {
  display: block;
  color: var(--text-main);
}

.safety-list li {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
  font-size: 0.9rem;
  color: var(--text-main);
}

.safety-list li i {
  color: var(--secondary-color);
  margin-top: 3px;
}

/* Ads Grid */
.ads-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 6 kolom untuk desktop */
  gap: 1.5rem;
}

.ad-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.ad-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: transparent; /* Remove border on hover for cleaner look */
  transform: translateY(-4px);
}

.ad-image-container {
  width: 100%;
  padding-top: 65%; /* Aspect Ratio 3:2 */
  background-color: #f0f0f0;
  position: relative;
  overflow: hidden;
}

.ad-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ad-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #ffce32;
  color: #002f34;
  font-size: 0.75rem; /* Fixed typo */
  padding: 4px 10px;
  border-radius: 2px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 2;
}

.ad-fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  color: var(--text-main);
  z-index: 2;
  transition: var(--transition);
}

.ad-fav-btn:hover {
  background: var(--text-main);
  color: white;
}

.ad-details {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1; /* Stretch to fill height */
  gap: 0.5rem;
}

.item-title {
  font-size: 1rem !important;
  font-weight: 500 !important;
  color: #002f34 !important;
  margin-bottom: 0.5rem !important;
  margin-top: 0.25rem !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding: 0 !important;
  line-height: 1.4 !important;
  display: block !important;
  overflow: visible !important;
  word-wrap: break-word;
  min-height: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 100% !important;
  height: auto !important;
  position: relative !important;
  z-index: 1 !important;
}


.ad-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.ad-meta {
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-light);
  border-top: 1px solid #f0f0f0;
  padding-top: 0.75rem;
}

/* Footer */
.footer {
  background-color: #ebeeef;
  padding: 4rem 0 0;
  margin-top: 4rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.9rem;
  width: 100%;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
}

.footer-col h3 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  color: var(--text-main);
  letter-spacing: 0.5px;
}

.footer-col ul li {
  margin-bottom: 0.6rem;
}

.footer-col ul li a {
  font-size: 0.85rem;
  color: var(--text-light);
  transition: color 0.2s;
}

.footer-col ul li a:hover {
  color: var(--text-main);
}

.footer-bottom {
  background-color: var(--primary-color);
  color: white;
  padding: 1.5rem 0;
  font-size: 0.75rem;
  text-align: right;
  margin-top: 0; /* Removing top margin as it's handled by footer spacing */
}

.footer-bottom .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Responsiveness */
@media (max-width: 1024px) {
  .search-location {
    min-width: 180px;
  }

  .search-location select.search-input {
    padding: 0 2.25rem 0 2.5rem;
    font-size: 0.9rem;
  }

  .search-location .fa-location-dot {
    left: 0.75rem;
    font-size: 0.95rem;
  }

  .search-location .fa-chevron-down {
    right: 0.75rem;
    font-size: 0.7rem;
  }

  /* Ads Grid Tablet */
  .ads-grid {
    grid-template-columns: repeat(3, 1fr); /* 3 kolom untuk tablet */
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .header {
    position: relative;
  }

  .navbar {
    height: auto;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    gap: 1rem;
  }

  /* Make Navbar top row (Logo + Login/Sell) */
  .navbar {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "logo actions"
      "search search";
  }

  .logo {
    grid-area: logo;
    margin: 0;
  }

  .nav-actions {
    grid-area: actions;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .nav-link {
    display: inline-flex !important; /* Show Login button on mobile */
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    background: var(--primary-color);
    color: white !important;
    transition: var(--transition);
    white-space: nowrap;
  }

  .nav-link:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
  }

  .nav-link i {
    font-size: 0.8rem;
  }

  .sell-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }

  .search-container {
    grid-area: search;
    width: 100%;
    max-width: none;
    flex-direction: column;
    gap: 0.75rem;
  }

  .search-location,
  .search-bar {
    width: 100%;
    flex-basis: auto;
    border-width: 1px; /* Thinner border on mobile */
  }

  .search-location {
    min-width: auto;
  }

  .search-location select.search-input {
    padding: 0 2rem 0 2.5rem;
    font-size: 0.9rem;
    font-weight: 600;
  }

  .search-location .fa-location-dot {
    left: 0.75rem;
    font-size: 0.95rem;
  }

  .search-location .fa-chevron-down {
    right: 0.75rem;
    font-size: 0.7rem;
  }

  /* Ads Grid Mobile */
  .ads-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 kolom untuk mobile */
    gap: 1rem;
  }

  .categories-section {
    padding: 0.5rem 0;
  }

  .cat-nav {
    gap: 1.5rem;
    padding: 0 1rem; /* Add padding so items aren't cut off at edge */
  }

  /* Detail Page Mobile */
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .item-price {
    font-size: 1.5rem;
  }

  .item-title {
    font-size: 1.1rem;
  }

  .ad-card {
    border-radius: 8px; /* Slightly softer on mobile */
  }

  .ad-image-container {
    height: 140px; /* Force height */
  }

  .ad-details {
    padding: 0.75rem;
  }

  .ad-price {
    font-size: 1rem;
  }

  .item-title {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
  }

  .ad-meta {
    font-size: 0.65rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
  }

  /* Footer Mobile */
  .footer {
    padding-top: 2rem;
    margin-top: 2rem;
  }

  .footer-content {
    grid-template-columns: 1fr; /* Stack columns */
    gap: 1.5rem;
    text-align: center;
  }

  .footer-col h3 {
    margin-bottom: 0.5rem;
  }

  .footer-bottom .container {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .ads-grid {
    grid-template-columns: 1fr; /* Full width cards on very small screens */
  }
}

/* Authentication Pages */
.auth-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  padding: 2rem 0;
}

.auth-card {
  background: white;
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 420px;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header h2 {
  font-size: 1.5rem;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.auth-header p {
  color: var(--text-light);
  font-size: 0.95rem;
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 4px rgba(0, 164, 159, 0.1);
}

.forgot-pass {
  display: block;
  text-align: right;
  font-size: 0.85rem;
  color: var(--secondary-color);
  margin-top: 0.5rem;
  font-weight: 500;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 1rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-block {
  width: 100%;
  display: block;
}

.auth-divider {
  text-align: center;
  margin: 1.5rem 0;
  position: relative;
}

.auth-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--border-color);
  z-index: 1;
}

.auth-divider span {
  background: white;
  position: relative;
  z-index: 2;
  padding: 0 1rem;
  color: var(--text-light);
  font-size: 0.85rem;
}

.btn-social {
  width: 100%;
  padding: 0.8rem;
  border: 2px solid var(--border-color);
  background: white;
  border-radius: var(--radius-md);
  margin-bottom: 0.8rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  transition: var(--transition);
  font-size: 0.95rem;
}

.btn-social:hover {
  background-color: #f8f9fa;
  border-color: #cdd3d4;
}

.btn-google {
  color: #db4437;
  border-color: #e0e0e0;
}

.btn-facebook {
  color: #4267b2;
  border-color: #e0e0e0;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-light);
}

.auth-footer a {
  color: var(--secondary-color);
  font-weight: 600;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* Post Ad Page */
.post-ad-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

.page-title {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 2rem;
  color: var(--text-main);
}

.form-section {
  background: white;
  padding: 2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
}

.form-section-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
}

.form-text {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-light);
}

.input-group {
  display: flex;
  align-items: center;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.input-group:focus-within {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 4px rgba(0, 164, 159, 0.1);
}

.input-group-text {
  background: #f8f9fa;
  padding: 0 1rem;
  color: var(--text-light);
  font-weight: 600;
  border-right: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  height: 100%;
}

.input-group .form-control {
  border: none;
  border-radius: 0;
}

.input-group .form-control:focus {
  box-shadow: none;
}

/* Upload Grid */
.upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 1rem;
}

.upload-box {
  aspect-ratio: 1/1;
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  background: #fafafa;
}

.upload-box:hover {
  border-color: var(--secondary-color);
  background: #f0fbfc;
  color: var(--secondary-color);
}

.main-upload {
  grid-column: span 2;
  grid-row: span 2;
  background: white;
  border-color: var(--secondary-color);
}

.upload-box i {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-light);
}

.upload-box:hover i {
  color: var(--secondary-color);
}

.upload-box span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
}

.file-input {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* User Review Section */
.user-review {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.avatar-circle {
  width: 48px;
  height: 48px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
}

.form-actions {
  text-align: right;
  margin-top: 2rem;
  margin-bottom: 4rem;
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
}

/* Photo Upload Delete Button */
.upload-box {
  position: relative; /* Ensure relative for absolute children */
}

.delete-photo-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ff4d4d;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  z-index: 10;
  transition: transform 0.2s;
}

.delete-photo-btn:hover {
  background: #cc0000;
  transform: scale(1.1);
}

.main-tag {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 47, 52, 0.7);
  color: white;
  font-size: 0.7rem;
  text-align: center;
  padding: 2px 0;
  font-weight: 600;
}

/* User Dropdown Menu */
.user-dropdown a:hover {
  background-color: #f0f7f7;
}
