/* Initially hide all tab contents */
.tabcontent {
    display: none;
    width: 100%;
}

/* Show tab content with active class and animation */
.tabcontent.active, 
#tabs .tab.active {
    display: table;
    animation: fadeInTab 0.4s ease-in-out forwards;
}

/* Grid Layout Fixes for Databases and Books */
.prodgrid.cat2, .prodgrid.cat3 {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    width: 100%;
}

.prodgrid.cat2 .product, .prodgrid.cat3 .product {
    float: none !important;
    display: flex !important;
    flex-direction: column;
    width: 31% !important;
    margin: 10px 1.15% 60px !important;
    height: auto !important;
}

.prodgrid.cat2 .product .img, .prodgrid.cat3 .product .img {
    width: 100%;
    min-height: 170px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prodgrid.cat2 .product .img img, .prodgrid.cat3 .product .img img {
    max-width: 100%;
    height: auto;
    width: auto;
}

@keyframes fadeInTab {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
