/* General Page Section */
.page-section {
    padding: 2rem 4rem 5rem;
    color: var(--black);
    background-color: var(--bg-color);
    animation: fadeIn 0.6s ease-in-out;
}

.page-section .page-title {
    text-align: center;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Category Blocks */
.category-block {
    margin-top: 4rem;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #374151;
    padding-bottom: 0.6rem;
    margin-bottom: 2rem;
}

.category-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--black);
}

/* Buttons */
.category-header .btn-show-more {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    border: 1px solid #374151;
    padding: 0.5rem 1rem;
    border-radius: 0.6rem;
    transition: all 0.3s ease;
}

.category-header .btn-show-more:hover {
    transform: translateY(-2px);
}

/* Grid Layout */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2.5rem;
}

/* Item Cards */
.item-card {
    background: var(--white);
    border-radius: 1.2rem;
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.item-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.25);
}

/* Image Section */
.image-wrapper {
    width: 100%;
    height: 220px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
}

.image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.item-card:hover .image-wrapper img {
    transform: scale(1.07);
}

.no-image {
    color: #9ca3af;
    font-style: italic;
    font-size: 1.3rem;
}

/* Card Body */
.card-body {
    padding: 1.8rem;
    text-align: center;
}

.item-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 0.8rem;
}

.item-description {
    font-size: 1.4rem;
    color: var(--grey);
    margin-bottom: 1.5rem;
    line-height: 1.5;
    min-height: 4rem;
    overflow: hidden;
}

/* Details Button */
.btn-details {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    font-weight: 500;
    padding: 0.8rem 1.6rem;
    border-radius: 0.6rem;
    transition: background 0.3s ease, transform 0.3s ease;
}

.btn-details:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

/* Empty State */
.no-items {
    color: #9ca3af;
    font-style: italic;
    padding: 2rem 0;
    text-align: center;
}

/* Responsive Design */
/* Tablets: max-width 1024px */
@media (max-width: 1024px) {
    .page-section {
        padding: 1.5rem 2rem;
    }

    .page-title {
        font-size: 2rem;
    }

    /* 2 cards per row */
    .items-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .item-card {
        border-radius: 0.8rem;
    }

    .item-card .image-wrapper {
        height: 120px;
        /* smaller image */
    }

    .item-card .item-name {
        font-size: 1.3rem;
        margin-bottom: 0.4rem;
    }

    .item-card .item-description {
        font-size: 1rem;
        line-height: 1.3;
        min-height: 2rem;
        margin-bottom: 0.6rem;
    }

    .btn-details {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
}

/* Phones: max-width 640px */
@media (max-width: 640px) {
    .page-section {
        padding: 1rem;
    }

    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }

    .category-title {
        font-size: 1.2rem;
    }

    /* 2 cards per row, really compact */
    .items-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }

    .item-card {
        border-radius: 0.6rem;
    }

    .item-card .image-wrapper {
        height: 90px;
        /* very small image */
    }

    .item-card .item-name {
        font-size: 1rem;
        margin-bottom: 0.3rem;
    }

    .item-card .item-description {
        font-size: 0.85rem;
        line-height: 1.2;
        min-height: 1.8rem;
        margin-bottom: 0.5rem;
    }

    .btn-details {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }
}


/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}