/* ===================================
   Common Category Page Styles
   =================================== */

/* --- Dynamic Hero Section --- */
.category-hero {
    position: relative;
    /* Default background - overridden inline in HTML for specific pages */
    background-color: #f0fdf4;
    padding: 160px 0 80px;
    text-align: center;
    color: var(--white);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.category-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.85) 0%, rgba(16, 185, 129, 0.8) 100%);
    z-index: 1;
}

.category-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

/* Service Area Badge - Changed from red to vibrant teal/green */
.service-area-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: #10b981; /* Changed from red (#e11d48) to green - positive and standout */
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0% { transform: scale(0.95); }
    50% { transform: scale(1.05); }
    100% { transform: scale(0.95); }
}

.category-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.category-subtitle {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* --- Listing Layout --- */
.listing-section {
    padding: 5rem 0;
    background-color: #f9fafb;
}

.listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* --- Premium Product Card --- */
.listing-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: all 0.4s ease;
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    position: relative;
}

.listing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
}

/* Image Area */
.card-image-box {
    position: relative;
    height: 260px;
    overflow: hidden;
}

.card-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.listing-card:hover .card-image-box img {
    transform: scale(1.1);
}

/* Badges */
.card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--secondary-color);
    color: white;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.badge-popular { background: #e11d48; } /* Red for popular */
.badge-premium { background: #f59e0b; color: #000; } /* Gold for premium */

/* Content Area */
.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.card-desc {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* Price & Action */
.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
    gap: 10px;
}

.price-tag {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary-color);
}

.price-unit {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: normal;
}

.btn-card-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    transition: var(--transition);
}

.btn-whatsapp {
    background: #ecfdf5;
    color: #10b981;
}

.btn-whatsapp:hover {
    background: #10b981;
    color: white;
}

.btn-call-card {
    background: #eff6ff;
    color: #3b82f6;
}

.btn-call-card:hover {
    background: #3b82f6;
    color: white;
}

/* --- Features Section (Mini Bento) --- */
.category-features {
    padding: 4rem 0;
    background: var(--white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-box {
    text-align: center;
    padding: 2rem;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: var(--transition);
}

.feature-box:hover {
    transform: translateY(-5px);
    background: white;
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.feature-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-box h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

/* ===================================
   Responsive Adjustments - Mobile First
   =================================== */
@media (max-width: 991px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .category-hero {
        padding: 140px 0 60px;
    }

    .category-title {
        font-size: 2.2rem;
    }

    .listing-grid {
        grid-template-columns: 1fr; /* Full width cards on mobile */
        gap: 1.5rem;
    }

    .card-image-box {
        height: 220px;
    }

    .listing-card {
        box-shadow: 0 4px 15px rgba(0,0,0,0.08); /* Softer shadow on mobile */
    }

    /* Make buttons bigger on mobile for tapping */
    .btn-card-action {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    /* FIXED: Feature boxes now look clean on mobile - centered layout */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .feature-box {
        text-align: center; /* Keep centered on mobile */
        padding: 1.5rem 1rem;
        display: block; /* Changed from flex to block */
    }

    .feature-icon {
        margin-bottom: 0.75rem; /* Restore bottom margin */
        font-size: 2rem; /* Keep icon size prominent */
        display: block;
    }

    .feature-box h4 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .feature-box p {
        font-size: 0.9rem;
        line-height: 1.5;
    }
}
