/* 
 * BarnYard Marketplace - Specific Fixes
 * Contains targeted fixes for specific styling issues
 */

/* Fix 1: Ensure all category listings are visible (4 instead of 2) */
.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Fix 2: Ensure all featured listings are visible (showing all 6) */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 30px;
}

/* Fix 3: Increase category and product card sizes */
.category-card {
    aspect-ratio: 1 / 1;
    width: 100%;
}

.category-image {
    height: 65%;
}

.category-info {
    height: 35%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Fix 4: Add white background to Browse Categories section */
.categories {
    background-color: white;
    padding: 80px 0;
}

/* Fix: Category card icons */
.category-icon-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, #3d6b2a 100%);
}

.category-icon-wrapper i {
    font-size: 64px;
    color: white;
    opacity: 0.9;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.category-card:hover .category-icon-wrapper i {
    transform: scale(1.1);
    opacity: 1;
}

/* Fix 5: Center Featured Listings title */
.featured-listings h2 {
    text-align: center;
    position: relative;
    display: block;
    width: 100%;
    margin-bottom: 40px;
}

.featured-listings h2::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
}

/* Fix 6: Ensure button hover state keeps text white */
.btn:hover,
.product-info .btn:hover {
    color: white;
}

/* Fix 7: Hero section with background image overlay */
.hero {
    background-image: url('../images/placeholders/farm-hero.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    margin-bottom: 0;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero h2,
.hero p,
.hero .btn {
    color: white;
}

/* Fix 8: Adjust BarnYard logo size and vertical centering */
.logo {
    display: flex;
    align-items: center;
    height: 100%;
}

.logo h1 {
    font-size: 28px;
    margin: 0;
}

/* Fix 9: Ensure section spacing connects without gaps */
.hero {
    padding: 120px 0;
    margin-bottom: 0;
}

/* Fix 10: Phone input styling consistent with other form fields */
.form-group input[type="tel"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
    transition: var(--transition);
}

.form-group input[type="tel"]:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(90, 141, 59, 0.2);
}

/* Responsive styles */
@media (max-width: 1200px) {
    .category-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .category-grid {
        grid-template-columns: 1fr;
        max-width: 350px;
        margin: 0 auto;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
}
