/* 
   Spacing Fixes for Dirty Paws Website
   Resolves overlapping elements and spacing issues
*/

/* Fix for fixed header spacing */
body {
    padding-top: 80px; /* Account for fixed header */
}

/* Ensure proper z-index hierarchy */
header {
    z-index: 1000;
}

.hero, .hero-section {
    position: relative;
    z-index: 1;
}

/* Fix overlapping sections */
section {
    position: relative;
    overflow: hidden;
}

/* Consistent spacing between sections */
.section,
.product-section,
.story-section,
.values-section,
.team-section {
    padding: 4rem 5%;
    margin: 0;
}

/* Fix banner spacing for pages */
.page-banner,
.product-banner {
    padding-top: 10rem; /* Extra padding to account for fixed header */
    padding-bottom: 3rem;
}

/* Prevent content overflow */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Fix product card spacing */
.product-grid,
.products-grid,
.values-grid,
.team-grid {
    gap: 2rem;
    margin-top: 3rem;
}

.product-card,
.product-item {
    margin: 0;
    padding: 1.5rem;
}

/* Fix button overlaps */
.btn {
    margin: 0.5rem;
    display: inline-block;
    white-space: nowrap;
}

/* Fix navigation spacing */
.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

/* Mobile spacing fixes */
@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
    
    .page-banner,
    .product-banner {
        padding-top: 8rem;
        padding-bottom: 2rem;
    }
    
    .section,
    .product-section,
    .story-section,
    .values-section,
    .team-section {
        padding: 3rem 5%;
    }
    
    .product-grid,
    .products-grid,
    .values-grid,
    .team-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    h1 {
        font-size: 2rem !important;
    }
    
    h2 {
        font-size: 1.75rem !important;
    }
}

/* Fix form element spacing */
input,
textarea,
select {
    margin-bottom: 1rem;
    padding: 0.75rem;
    width: 100%;
    max-width: 100%;
}

/* Fix image spacing to prevent overflow */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Clear floats */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* Fix hero content positioning */
.hero-content {
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Ensure modals and popups are above everything */
.modal,
.popup,
.ai-modal {
    z-index: 2000;
}

/* Fix footer spacing */
footer {
    margin-top: 4rem;
    padding: 3rem 5% 2rem;
}

/* Prevent horizontal scroll */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

/* Fix card hover effects not causing layout shift */
.product-card:hover,
.value-card:hover,
.team-member:hover {
    transform: translateY(-5px);
    margin-bottom: 5px; /* Compensate for transform */
}