﻿/* ===============================
   Category Page Header
================================ */
.Categories-page-wrapper .category-page-header {
    text-align: center;
    margin-bottom: 48px;
    padding-top: 10px;
}

    .Categories-page-wrapper .category-page-header h1 {
        font-size: clamp(26px, 4vw, 36px);
        font-weight: 800;
        color: #2c3e50;
        margin-bottom: 10px;
    }

    .Categories-page-wrapper .category-page-header p {
        max-width: 640px;
        margin: 0 auto;
        font-size: 1rem;
        color: #6c757d;
        line-height: 1.6;
    }






/* ===============================
   Container
================================ */
.Categories-page-wrapper .category-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ===============================
   Section Heading
================================ */
.Categories-page-wrapper .section-heading {
    font-size: 26px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 22px;
    padding-bottom: 6px;
    position: relative;
}

    .Categories-page-wrapper .section-heading::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: 0;
        width: 42px;
        height: 3px;
        background: linear-gradient(90deg, #ff6600, #ffa84c);
        border-radius: 3px;
    }

/* ===============================
   Grid
================================ */
.Categories-page-wrapper .category-row {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    padding-bottom: 30px;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee; /* clear separator after row */
}

/* ===============================
   Card (Desktop default)
================================ */
.Categories-page-wrapper .category-card {
    flex: 0 0 calc(25% - 18px);
    max-width: calc(25% - 18px);
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 14px;
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease;
}

    .Categories-page-wrapper .category-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 10px 22px rgba(0,0,0,.15);
    }


    /* ===============================
   Image (Uniform Crop)
================================ */
    .Categories-page-wrapper .category-card img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        aspect-ratio: 1 / 1;
        transition: transform 0.3s ease;
    }

    .Categories-page-wrapper .category-card:hover img {
        transform: scale(1.06);
    }

/* ===============================
   Text Area
================================ */


.Categories-page-wrapper .category-name {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 6px 0 8px;
    text-align: center;
}
.Categories-page-wrapper .card-content {
    padding: 16px 12px 18px;
    text-align: center;
}


.Categories-page-wrapper .category-helper {
    display: -webkit-box;
    -webkit-line-clamp: 3; /* 3 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.82rem;
    color: #666;
    line-height: 1.45;
    text-align: center;
    padding: 0 6px; /* left-right breathing */
    margin-top: 4px;
}

    /* ===============================
   Fade-in animation
================================ */
    @keyframes cardFadeIn {
        from {
            opacity: 0;
            transform: translateY(16px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .Categories-page-wrapper .category-card {
        animation: cardFadeIn 0.45s ease forwards;
        opacity: 0;
    }
    /* ===============================
   Mobile (Single column)
================================ */
    @media (max-width: 768px) {

        .Categories-page-wrapper .category-card {
            flex: 0 0 100%;
            max-width: 100%;
            aspect-ratio: auto; /* important */
        }
        .Categories-page-wrapper .category-name {
            font-size: 17px;
            margin-top: 10px;
            margin-bottom: 6px;
        }
        .Categories-page-wrapper .category-helper {
            -webkit-line-clamp: 3;
            font-size: 0.85rem;
        }

        .Categories-page-wrapper .image-wrap {
            aspect-ratio: 1 / 1; /* image still square */
        }

        .Categories-page-wrapper .section-heading {
            font-size: 22px;
        }

        .Categories-page-wrapper .category-row {
            gap: 20px;
            padding-bottom: 24px;
            margin-bottom: 24px;
        }
    }
