/* ========================================
   BREEDS PAGE STYLES
   Matches homepage design system
   ======================================== */

/* Brand variables for breeds page */
:root {
  --breeds-primary: #e8836b;
  --breeds-primary-dark: #d96b52;
  --breeds-primary-light: #f4a896;
  --breeds-primary-rgb: 232, 131, 107;
}

.breeds-main {
  min-height: calc(100vh - 200px);
  background: linear-gradient(180deg, #fff8f5 0%, #fff 100%);
  padding: 1.5rem 0 4rem;
}

/* ========================================
   PAGE HEADER
   ======================================== */
.breeds-header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 1rem 1rem;
}

.breeds-header h1 {
  font-size: 2.5rem;
  color: #222;
  margin-bottom: 1rem;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
}

.breeds-header .lead {
  font-size: 1.2rem;
  color: #666;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ========================================
   SEARCH & FILTERS
   ======================================== */
.breeds-controls {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 3rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

/* Search Bar */
.search-container {
  position: relative;
  margin-bottom: 2rem;
}

.search-input {
  width: 100%;
  padding: 1rem 3rem 1rem 1.25rem;
  font-size: 1.1rem;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  font-family: "Nunito", sans-serif;
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--breeds-primary);
  box-shadow: 0 0 0 3px rgba(var(--breeds-primary-rgb), 0.15);
}

.search-icon {
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  pointer-events: none;
  opacity: 0.5;
}

.search-container.has-text .search-icon {
  display: none;
}

.search-clear-btn {
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  color: #aaa;
  padding: 0 0.15rem;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.search-clear-btn:hover {
  color: var(--breeds-primary);
}

.breeds-count-label {
  font-size: 0.9rem;
  color: #888;
  margin: -1.5rem 0 1.5rem;
  font-family: "Nunito", sans-serif;
}

/* Filter Sections */
.filter-section {
  margin-bottom: 1.5rem;
}

.filter-section:last-of-type {
  margin-bottom: 0;
}

.filter-label {
  display: block;
  font-weight: 700;
  color: #444;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  font-family: "Montserrat", sans-serif;
}

.size-filters,
.type-filters {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.4rem 1.1rem;
  border: 1.5px solid #d8d8d8;
  background: white;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  color: #555;
  font-family: "Nunito", sans-serif;
  white-space: nowrap;
}

.filter-btn:hover {
  border-color: var(--breeds-primary);
  color: var(--breeds-primary);
  box-shadow: 0 2px 8px rgba(var(--breeds-primary-rgb), 0.12);
}

.filter-btn.active {
  background: linear-gradient(
    135deg,
    var(--breeds-primary) 0%,
    var(--breeds-primary-light) 100%
  );
  color: white;
  border-color: var(--breeds-primary);
  box-shadow: 0 4px 12px rgba(var(--breeds-primary-rgb), 0.3);
}

/* Results Info */
.results-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid #f0f0f0;
  margin-top: 1.5rem;
}

.results-info strong {
  color: var(--breeds-primary);
  font-weight: 700;
}

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

.btn-text:hover {
  color: var(--breeds-primary-light);
}

.breeds-status {
  margin-top: 1.25rem;
  font-size: 0.95rem;
  color: #666;
  min-height: 1.2em;
}

.breeds-status.status-success {
  color: #23613c;
}

.breeds-status.status-error {
  color: var(--breeds-primary-dark);
}

.breeds-status.status-info {
  color: #555;
}

/* ========================================
   BREEDS GRID
   ======================================== */
.breeds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

/* Breed Card */
.breed-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  scroll-margin-top: 140px;
}

.breed-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.breed-card.hidden {
  display: none;
}

.breed-image {
  height: 220px;
  overflow: hidden;
  position: relative;
}

.breed-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
  transition:
    transform 0.3s ease,
    opacity 0.4s ease-in-out;
}

.breed-image img:not([data-loaded]) {
  opacity: 0.6;
}

.breed-card:hover .breed-image img {
  transform: scale(1.05);
}

.breed-image.no-image {
  background: linear-gradient(135deg, #f5ebe8 0%, #ede3df 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.breed-image.no-image::before {
  content: "🐾";
  font-size: 2rem;
  opacity: 0.4;
}

.breed-image.no-image::after {
  content: "Photo coming soon";
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #b88c82;
}

.breed-info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.breed-info h3 {
  font-size: 1.4rem;
  color: #222;
  margin-bottom: 0.75rem;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
}

/* Breed Meta (Size & Type Badges) */
.breed-meta {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.size-badge,
.type-badge {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.size-badge.small {
  background: #e3f2fd;
  color: #1976d2;
}

.size-badge.medium {
  background: #fff3e0;
  color: #f57c00;
}

.size-badge.large {
  background: #fce4ec;
  color: #c2185b;
}

.size-badge.giant {
  background: #f3e5f5;
  color: #7b1fa2;
}

.type-badge {
  background: #f0f0f0;
  color: #666;
}

.type-badge.crossbred {
  background: #e8f5e9;
  color: #388e3c;
}

/* Breed Description */
.breed-description {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Breed Stats */
.breed-stats {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding: 1rem;
  background: #fafafa;
  border-radius: 8px;
}

.stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-label {
  font-size: 0.85rem;
  color: #666;
  font-weight: 600;
}

.stat-value {
  font-size: 1rem;
  color: var(--breeds-primary);
  letter-spacing: 2px;
}

/* View Details Button */
.btn-small {
  padding: 0.65rem 1.5rem;
  font-size: 0.95rem;
  width: 100%;
}

/* ========================================
   NO RESULTS
   ======================================== */
.no-results {
  text-align: center;
  padding: 4rem 2rem;
}

.no-results-content {
  max-width: 500px;
  margin: 0 auto;
}

.no-results-icon {
  font-size: 4rem;
  display: block;
  margin-bottom: 1rem;
  opacity: 0.3;
}

.no-results h3 {
  font-size: 1.8rem;
  color: #444;
  margin-bottom: 0.75rem;
}

.no-results p {
  color: #666;
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

/* ========================================
   CTA SECTION
   ======================================== */
.breeds-cta {
  background: linear-gradient(
    135deg,
    var(--breeds-primary) 0%,
    var(--breeds-primary-light) 100%
  );
  border-radius: 16px;
  padding: 3rem 2rem;
  text-align: center;
  margin-top: 4rem;
  box-shadow: 0 8px 24px rgba(var(--breeds-primary-rgb), 0.3);
}

.cta-content h2 {
  font-size: 2rem;
  color: white;
  margin-bottom: 1rem;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
}

.cta-content p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.breeds-cta .btn-large {
  background: white;
  color: var(--breeds-primary);
  font-size: 1.2rem;
  padding: 1rem 3rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.breeds-cta .btn-large:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1024px) {
  .breeds-main {
    padding-top: 1rem;
  }

  .breeds-header {
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
  }

  .breeds-header h1 {
    font-size: 2.2rem;
  }
}

@media (max-width: 768px) {
  .breeds-header h1 {
    font-size: 2.2rem;
  }

  .breeds-header .lead {
    font-size: 1rem;
  }

  .breeds-controls {
    padding: 1.5rem;
  }

  .search-input {
    font-size: 1rem;
    padding: 0.9rem 3rem 0.9rem 1rem;
  }

  .results-info {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

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

  .breeds-cta {
    padding: 2rem 1.5rem;
  }

  .cta-content h2 {
    font-size: 1.6rem;
  }

  .cta-content p {
    font-size: 1rem;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .breeds-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1400px) {
  .breeds-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
