/* ══════════════════════════════════════════════
   BREEDS PAGE — Gun Dogs Hub
══════════════════════════════════════════════ */

/* ── Page Layout ── */
.breeds-page {
    background: var(--light-bg);
    padding: 2.5rem 0 4rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Page Header ── */
.breeds-header {
    margin-bottom: 2.5rem;
    text-align: center;
}

.breeds-header h2 {
    font-family: 'Inter', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.6rem;
    letter-spacing: -0.5px;
}

.breeds-header h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary-color), #d4af37);
    margin: 0.75rem auto 0;
    border-radius: 2px;
}

.breeds-header p {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 0;
    margin-top: 0.75rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* ── Content Grid ── */
.breeds-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2.5rem;
    align-items: start;
}

.breeds-main {
    min-width: 0;
}

/* ══════════════════════════════════════════════
   SORT CONTROLS
══════════════════════════════════════════════ */
.sort-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.75rem;
    background: var(--white);
    padding: 0.85rem 1.25rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.sort-controls label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.88rem;
    white-space: nowrap;
}

.sort-dropdown {
    position: relative;
}

.sort-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    color: var(--text-dark);
    min-width: 170px;
    justify-content: space-between;
    transition: var(--transition);
}

.sort-dropdown-btn:hover {
    border-color: var(--secondary-color);
}

.sort-dropdown-btn.active {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(185, 151, 91, 0.15);
}

.sort-dropdown-btn svg {
    color: var(--text-light);
    transition: var(--transition);
}

.sort-dropdown-btn.active svg {
    transform: rotate(180deg);
    color: var(--secondary-color);
}

.sort-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(27, 67, 50, 0.12);
    min-width: 170px;
    z-index: 1000;
    display: none;
    overflow: hidden;
}

.sort-dropdown-menu.show {
    display: block;
}

.sort-dropdown-item {
    display: block;
    padding: 0.7rem 1.15rem;
    color: var(--text-light);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.85rem;
    font-weight: 500;
}

.sort-dropdown-item:hover {
    background: rgba(185, 151, 91, 0.08);
    color: var(--secondary-color);
}

.sort-dropdown-item.active {
    background: rgba(185, 151, 91, 0.12);
    color: var(--secondary-color);
    font-weight: 600;
}

/* ══════════════════════════════════════════════
   BREED CARDS GRID
══════════════════════════════════════════════ */
.breeds-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.breed-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
}

.breed-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(185, 151, 91, 0.3);
    text-decoration: none;
    color: inherit;
}

.breed-card .breed-card-img-wrap {
    position: relative;
    overflow: hidden;
    height: 190px;
}

.breed-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.breed-card:hover .breed-card-image {
    transform: scale(1.06);
}

.breed-card-content {
    padding: 1rem 1.15rem;
}

.breed-card-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.breed-card-count {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: var(--text-light);
    font-weight: 500;
}

.breed-card-count svg {
    width: 15px;
    height: 15px;
    color: var(--secondary-color);
    flex-shrink: 0;
}

/* Badge: "Available" */
.breed-new-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: linear-gradient(135deg, var(--secondary-color), #d4af37);
    color: var(--white);
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(185, 151, 91, 0.35);
}

.breed-new-badge svg {
    width: 11px;
    height: 11px;
}

/* ══════════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════════ */
.breeds-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 20px;
    align-self: start;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--secondary-color) transparent;
}

.breeds-sidebar::-webkit-scrollbar { width: 5px; }
.breeds-sidebar::-webkit-scrollbar-track { background: transparent; border-radius: 10px; }
.breeds-sidebar::-webkit-scrollbar-thumb { background: var(--secondary-color); border-radius: 10px; }
.breeds-sidebar::-webkit-scrollbar-thumb:hover { background: #d4af37; }

.sidebar-section {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    overflow: hidden;
    padding: 0;
}

.sidebar-section h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    margin: 0;
    padding: 0.9rem 1.25rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-bottom: none;
    letter-spacing: 0.5px;
}

.sidebar-section-body {
    padding: 0.5rem 1.25rem;
}

/* ── Popular Breed Items ── */
.popular-breed-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    border-radius: 0;
}

.popular-breed-item:last-child {
    border-bottom: none;
}

.popular-breed-item:hover {
    text-decoration: none;
    color: inherit;
}

.popular-breed-item:hover .popular-breed-name {
    color: var(--secondary-color);
}

.popular-breed-item:hover .popular-breed-arrow {
    color: var(--secondary-color);
    transform: translateX(3px);
}

.popular-breed-thumb {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--border-color);
    transition: var(--transition);
}

.popular-breed-item:hover .popular-breed-thumb {
    border-color: var(--secondary-color);
}

.popular-breed-info {
    flex: 1;
    min-width: 0;
}

.popular-breed-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.15rem;
    font-size: 0.88rem;
    transition: var(--transition);
}

.popular-breed-count {
    font-size: 0.78rem;
    color: var(--text-light);
    font-weight: 500;
}

.popular-breed-arrow {
    color: var(--text-light);
    flex-shrink: 0;
    transition: var(--transition);
}

/* ── Recent Listing Items ── */
.recent-listing-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.recent-listing-item:last-child {
    border-bottom: none;
}

.recent-listing-item:hover {
    text-decoration: none;
    color: inherit;
}

.recent-listing-item:hover .recent-listing-title {
    color: var(--secondary-color);
}

.recent-listing-image {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.recent-listing-item:hover .recent-listing-image {
    border-color: var(--secondary-color);
}

.recent-listing-title {
    font-size: 0.85rem;
    color: var(--text-dark);
    font-weight: 500;
    line-height: 1.45;
    transition: var(--transition);
}

/* ══════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════ */
@media (max-width: 1199.98px) {
    .breeds-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 991.98px) {
    .breeds-content {
        grid-template-columns: 1fr;
    }

    .breeds-sidebar {
        order: -1;
        position: relative;
        top: 0;
        max-height: none;
        overflow-y: visible;
        padding-right: 0;
    }

    .breeds-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767.98px) {
    .breeds-page {
        padding: 1.5rem 0 3rem;
    }

    .breeds-header h2 {
        font-size: 1.6rem;
    }

    .breeds-header p {
        font-size: 0.9rem;
    }

    .breeds-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .breed-card .breed-card-img-wrap {
        height: 150px;
    }

    .breed-card-content {
        padding: 0.85rem 1rem;
    }

    .breed-card-title {
        font-size: 0.95rem;
    }

    .sort-controls {
        flex-wrap: wrap;
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 479.98px) {
    .breeds-grid {
        grid-template-columns: 1fr;
    }

    .breed-card .breed-card-img-wrap {
        height: 180px;
    }
}
