/* ================= FILTER SECTION ================= */
.filters-wrapper {
  width: 100%;
  padding: 1.5rem 1rem;
  display: flex;
  justify-content: center;
}

.filters-container {
  max-width: 1200px;
  width: 100%;
}

.filters-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.filter-btn {
  padding: 0.5rem 1.25rem;
  background-color: #f8f7f5;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.875rem;
  color: #5a4b3a;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  background-color: #e8e6e0;
}

.filter-btn.active {
  background-color: #5a4b3a;
  color: #ffffff;
}

/* ================= PET LISTINGS ================= */
.pets-section-wrapper {
  padding: 2rem 1rem;
  background: #f9f7f3;
  min-height: 80vh;
}

.pets-container {
  max-width: 1400px;
  margin: 0 auto;
}

/* MOBILE + TABLET = 2 CARDS */
.pets-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}

/* ================= PET CARD ================= */
.pet-card {
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.pet-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.12);
}

/* IMAGE */
.pet-card-image {
  position: relative;
  height: 180px;
  overflow: hidden;
}

.pet-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s ease;
}

.pet-card:hover .pet-card-image img {
  transform: scale(1.05);
}

/* DAYS LEFT (CARD) */
.days-left {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(0,0,0,0.75);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 14px;
  z-index: 2;
}

/* ================= SERVICE TYPE BADGE ================= */
.service-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255, 255, 255, 0.95);
  color: #222;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 14px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  text-transform: capitalize;
  z-index: 2;
  max-width: 80%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* CONTENT */
.pet-card-content {
  padding: 1rem;
  text-align: center;
}

.pet-name {
  font-size: 13px;
  color: #777;
  margin-bottom: 12px;
  min-height: 40px;
}

.pet-name h6 {
  margin: 0 0 5px 0;
  font-size: 14px;
  color: #333;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pet-name span {
  font-size: 12px;
  color: #999;
  display: block;
}

.view-more-btn {
  display: inline-block;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 600;
  color: #ff5a1f;
  border: 1px solid #ff5a1f;
  border-radius: 20px;
  text-decoration: none;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  cursor: pointer;
}

.view-more-btn:hover {
  background: #ff5a1f;
  color: white;
}

/* ================= IMAGE SLIDER STYLES ================= */
.slider-container {
  position: relative;
  height: 420px;
  overflow: hidden;
  border-radius: 15px 15px 0 0;
}

.slider-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.slider-image.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0.8; }
  to { opacity: 1; }
}

.slider-nav {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 10px;
  transform: translateY(-50%);
  z-index: 10;
}

.slider-nav button {
  background: rgba(0,0,0,0.6);
  color: white;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.slider-nav button:hover {
  background: rgba(0,0,0,0.9);
  transform: scale(1.1);
}

.slider-dots {
  position: absolute;
  bottom: 15px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 5;
}

.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  padding: 0;
}

.slider-dot.active {
  background: white;
  transform: scale(1.2);
}

/* ================= MODAL STYLES ================= */
.pet-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

.pet-modal {
  background: white;
  border-radius: 16px;
  max-width: 95%;
  width: 100%;
  max-height: calc(100dvh - 20px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  position: relative;
  animation: modalSlideIn 0.3s ease;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

@keyframes modalSlideIn {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.pet-modal-close {
  position: sticky;
  top: 12px;
  right: 12px;
  background: #ff5a1f;
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  margin-left: auto;
  margin-right: 12px;
  margin-top: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.pet-modal-close:hover {
  background: #e04a1a;
  transform: rotate(90deg);
}

.pet-modal-content {
  padding: 1.2rem;
}

.modal-service-badge {
  display: inline-block;
  background: linear-gradient(135deg, #5a4b3a 0%, #3a2f23 100%);
  color: white;
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pet-modal-content h2 {
  margin: 0 0 12px 0;
  color: #222;
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.3;
}

.pet-modal-desc {
  color: #555;
  line-height: 1.6;
  margin-bottom: 1.2rem;
  font-size: 14px;
  white-space: pre-line;
  background: #f9f7f3;
  padding: 1rem;
  border-radius: 10px;
  border-left: 4px solid #5a4b3a;
}

/* COMPACT DETAILS SECTION */
.pet-modal-details {
  margin-bottom: 1.2rem;
  padding: 1.2rem;
  background: #f8f7f5;
  border-radius: 12px;
  border: 1px solid #e8e6e0;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.detail-item {
  background: white;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #e8e6e0;
  transition: all 0.2s;
}

.detail-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  border-color: #5a4b3a;
}

.detail-label {
  font-weight: 700;
  color: #5a4b3a;
  font-size: 12px;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.detail-label:before {
  content: "•";
  color: #ff5a1f;
  font-size: 14px;
}

.detail-value {
  color: #333;
  font-size: 13px;
  line-height: 1.4;
  word-break: break-word;
  font-weight: 500;
}

.detail-value.price {
  color: #ff5a1f;
  font-weight: 800;
  font-size: 14px;
}

/* COMPACT INFO SECTION */
.pet-modal-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 1.2rem;
  padding: 1rem;
  background: white;
  border-radius: 10px;
  border: 1px solid #e8e6e0;
}

.info-item {
  padding: 8px;
  border-radius: 8px;
  border-left: 3px solid #5a4b3a;
}

.info-item strong {
  color: #333;
  font-weight: 700;
  margin-bottom: 4px;
  display: block;
  font-size: 13px;
  color: #5a4b3a;
}

.info-item span {
  color: #555;
  font-size: 13px;
  font-weight: 500;
}

/* COMPACT CONTACT SECTION */
.pet-modal-seller {
  background: #f9f7f3;
  padding: 1.2rem;
  border-radius: 12px;
  border: 1px solid #e8e6e0;
}

.pet-modal-seller h4 {
  margin: 0 0 15px 0;
  color: #5a4b3a;
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 2px solid #ff5a1f;
}

.contact-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 1.2rem;
}

.contact-details p {
  margin: 0;
  padding: 10px;
  background: white;
  border-radius: 8px;
  border: 1px solid #e8e6e0;
}

.contact-details strong {
  color: #5a4b3a;
  font-weight: 700;
  min-width: 70px;
  display: inline-block;
  font-size: 13px;
}

.seller-actions {
  display: flex;
  gap: 10px;
  margin-top: 1.5rem;
}

.call-btn, .whatsapp-btn {
  flex: 1;
  padding: 12px;
  text-align: center;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.call-btn {
  background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
  color: white;
}

.whatsapp-btn {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: white;
}

.call-btn:hover, .whatsapp-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
  opacity: 0.95;
}

/* ================= NO RESULTS ================= */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: #777;
}

.no-results h3 {
  margin-bottom: 10px;
  font-size: 1.3rem;
  font-weight: 600;
}

.no-results p {
  color: #999;
  font-size: 0.9rem;
}

/* Days left badge in modal */
.pet-modal-days {
  position: absolute;
  top: 15px;
  left: 15px;
  background: rgba(255, 90, 31, 0.9);
  color: white;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 20px;
  z-index: 20;
  box-shadow: 0 4px 12px rgba(255, 90, 31, 0.4);
}

/* Modal header for close button positioning */
.modal-header-container {
  position: relative;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 640px) {
  .pet-modal {
    max-width: 98%;
    border-radius: 14px;
  }
  
  .slider-container {
    height: 480px;
  }
  
  .pet-modal-content {
    padding: 1rem;
  }
  
  .pet-modal-content h2 {
    font-size: 1.2rem;
  }
  
  .details-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .seller-actions {
    flex-direction: column;
  }
  
  .pet-modal-info {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 0.8rem;
  }
  
  .contact-details {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .slider-nav button {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }
  
  .pet-modal-days {
    top: 10px;
    left: 10px;
    font-size: 11px;
    padding: 6px 12px;
  }
  
  .pet-modal-close {
    width: 36px;
    height: 36px;
    font-size: 20px;
    top: 8px;
    right: 8px;
    margin-top: 8px;
    margin-right: 8px;
  }
}

@media (min-width: 768px) {
  .pets-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .pet-modal {
    max-width: 700px;
  }
  
  .slider-container {
    height: 440px;
  }
}

@media (min-width: 1024px) {
  .pets-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1280px) {
  .pets-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}


button.view-more-btn {
  cursor: pointer !important;
}



.pet-modal-overlay {
  overscroll-behavior: contain;
}

.slider-container {
  touch-action: pan-y;
}