/*
Theme Name: Astra Child
Template: astra
Version: 1.0.0
*/

/* adjust primary id margin  */
.ast-separate-container #primary{
    margin-top: 30px;
}

@media (max-width: 768px) {
    .ast-separate-container #primary {
        margin-top: 30px;
        padding-top: 0;
        padding-bottom: 0;
    }
}

@media (max-width: 992px) {
    .ast-separate-container #primary {
        margin-top: 30px;
        padding-top: 0;
        padding-bottom: 0;
    }
}

/* banner */
.cate-banner-wrapper {
    width: 100%;
    margin-bottom: 40px;
}

.cate-banner-image {
    position: relative;
    height: 300px; 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 3px; 
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .cate-banner-image {
        height: 200px;
    }
}

/* product grid container */
.product-category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(260px, 1fr));
    gap: 20px;
    padding: 1.5em 0;
}

.product-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border-radius: 8px;
    border: none;
    transition: all 0.25s ease;
}

.product-card .product-image {
    width: 100%;
    height: auto;
    max-height: 350px;
    /* object-fit: contain;  */ /* Fully preserve the image proportion without any horizontal cropping */
    background: #fafafa;
}

.product-card .product-info {
    padding: 10px 15px;
}

.product-card .product-title {
    font-size: inherit;
    font-weight: 600;
    line-height: inherit;
    color: inherit;
    margin: 10px 0 6px;
}

.product-card .product-desc {
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    color: #666;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* Hover effect: slight upward movement+shadow enhancement */
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.06); /* Low saturation light gray shadow, no abrupt colors */
}


/* Mobile adaptation: The small screen automatically changes to 2 columns */
@media (max-width: 768px) {
    .product-category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .product-card .product-image {
        max-height: 250px;
    }
}
