/* ══════════════════════════════════════════════════════════════
   COMMON CSS — Gun Dogs Hub
   Shared styles across all frontend pages
   ══════════════════════════════════════════════════════════════ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Playfair+Display:wght@400;500;600;700;800;900&display=swap');

/* ── CSS Variables ── */
:root {
    --primary-color: #1b4332;
    --secondary-color: #b9975b;
    --accent-color: #2d5a47;
    --light-bg: #f8f9fa;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --white: #ffffff;
    --border-color: #e9ecef;
    --danger: #dc3545;
    --success: #28a745;
    --shadow: 0 4px 20px rgba(27, 67, 50, 0.1);
    --shadow-hover: 0 8px 30px rgba(27, 67, 50, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body, html {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--light-bg);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary-color);
}

/* ══════════════════════════════════════════════
   SECTION LAYOUTS
══════════════════════════════════════════════ */
.section-modern {
    padding: 5rem 0;
    position: relative;
}

.section-bg-light {
    background: var(--light-bg);
}

.section-bg-white {
    background: var(--white);
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 1.25rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary-color), #d4af37);
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 3.5rem;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 1rem;
    line-height: 1.7;
}

/* ══════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════ */
.btn-modern {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 1rem 2.25rem;
    font-size: 1.05rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.2px;
}

.btn-primary-modern {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #d4af37 100%);
    color: var(--white);
    box-shadow: 0 4px 20px rgba(185, 151, 91, 0.35);
}

.btn-primary-modern:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(185, 151, 91, 0.45);
    color: var(--white);
}

.btn-secondary-modern {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
}

.btn-secondary-modern:hover {
    background: var(--white);
    color: var(--primary-color);
    border-color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

/* ══════════════════════════════════════════════
   DOG CARD (Shared listing card)
══════════════════════════════════════════════ */
.dog-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.dog-card.visible:hover {
    transform: translateY(-5px) !important;
    box-shadow: var(--shadow-hover) !important;
    border-color: rgba(185, 151, 91, 0.3) !important;
}

.dog-card .thumbnail {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    padding-top: 0;
    background: #e4e4e4;
}

.dog-card .thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    display: block;
    transition: transform 0.4s ease;
}

.dog-card:hover .thumbnail img {
    transform: none;
}

.dog-card .ad_meta {
    padding: 1rem 1.15rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: var(--white);
    gap: 4px;
}

.dog-card h2 {
    color: var(--text-dark);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 4px 0;
    line-height: 1.4;
    transition: var(--transition);
}

.dog-card:hover h2 {
    color: var(--primary-color);
}

.dog-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dog-card ul li {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 3px;
    color: var(--text-light);
    font-size: 0.78rem;
    padding: 0;
}

.dog-card ul li:last-child {
    margin-bottom: 0;
}

.dog-card ul li span {
    color: var(--secondary-color);
    font-weight: 600;
    min-width: 50px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.dog-card hr {
    margin: 6px 0;
    border: none;
    border-top: 1px solid var(--border-color);
}

/* ── Image Count Badge ── */
.image-count {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
}

/* ── Verified Badge ── */
.badge_verified {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

/* ── Boosted Badge ── */
.badge_boosted {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #ffbf00, #f5a623);
    color: #000;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(255, 191, 0, 0.3);
}

/* ── Sold Overlay ── */
.dog-sold {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.65);
    z-index: 4;
    color: var(--white);
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ── Breeder Info ── */
.breeder_info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 4px;
}

.breeder_profile {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.breeder_profile img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.breeder_meta h3 {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-dark);
}

.breeder_meta .location {
    color: var(--text-light);
    font-size: 0.72rem;
    display: flex;
    align-items: center;
    gap: 3px;
    font-weight: 500;
}

.breeder_meta .location i {
    color: var(--secondary-color);
    font-size: 0.65rem;
}

.price {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary-color);
    margin: 0;
}

/* ══════════════════════════════════════════════
   DOGS GRID
══════════════════════════════════════════════ */
.dogs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
}

.dogs-grid:has(.dog-card:only-child) {
    grid-template-columns: minmax(300px, 400px);
    justify-content: center;
}

.dogs-grid.single-card {
    grid-template-columns: minmax(300px, 400px);
    justify-content: center;
}

/* ══════════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════════ */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

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

/* ══════════════════════════════════════════════
   DETAIL CARD (Shared card component)
══════════════════════════════════════════════ */
.detail-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: none;
    margin-bottom: 1.5rem;
}

.detail-card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    padding: 1.25rem 1.75rem;
    position: relative;
    overflow: hidden;
}

.detail-card-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 150px;
    height: 150px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.detail-card-header h3 {
    font-family: 'Inter', sans-serif;
    color: var(--white);
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.detail-card-header h3 svg {
    flex-shrink: 0;
    opacity: 0.85;
}

.detail-card-body {
    padding: 1.75rem;
}

/* ══════════════════════════════════════════════
   RESPONSIVE — Common
══════════════════════════════════════════════ */
@media (max-width: 1199.98px) {
    .dogs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 991px) {
    .dogs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .section-modern {
        padding: 3.5rem 0;
    }

    .btn-modern {
        padding: 0.875rem 1.75rem;
        font-size: 0.95rem;
    }

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

    .dog-card .thumbnail {
        height: 180px;
    }

    .dog-card .ad_meta {
        padding: 0.85rem;
    }

    .dog-card h2 {
        font-size: 0.85rem;
    }

    .detail-card-body {
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    .dogs-grid {
        grid-template-columns: 1fr;
    }

    .dog-card .thumbnail {
        height: 220px;
    }
}
