/* Twizted Category Cards Styles */

.twizted-category-cards {
    display: grid;
    gap: 30px;
    margin: 40px 0;
}

/* Column layouts */
.twizted-category-cards.columns-1 {
    grid-template-columns: 1fr;
}

.twizted-category-cards.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.twizted-category-cards.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.twizted-category-cards.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Category card */
.category-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.category-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Image container */
.category-card-image {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 aspect ratio */
    background: #f8f8f8;
    overflow: hidden;
}

.category-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-card:hover .category-card-image img {
    transform: scale(1.05);
}

/* Product count badge */
.product-count {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Card content */
.category-card-content {
    padding: 25px;
    text-align: center;
}

.category-title {
    margin: 0 0 12px 0;
    font-size: 24px;
    font-weight: 700;
    color: #333333;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.category-description {
    margin: 0 0 20px 0;
    font-size: 15px;
    line-height: 1.6;
    color: #666666;
    min-height: 48px; /* Ensure consistent card heights */
}

/* Button area */
.category-card-button {
    margin-top: 20px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.category-card .category-card-button {
    opacity: 1;
    transform: translateY(0);
}

.shop-now-btn {
    display: inline-block;
    background: #8BC53F;
    color: #ffffff;
    padding: 14px 32px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(139, 197, 63, 0.3);
}

.category-card .shop-now-btn {
    background: #7AB32F;
    box-shadow: 0 6px 16px rgba(139, 197, 63, 0.4);
    transform: translateY(-2px);
}

/* Responsive breakpoints */
@media (max-width: 1024px) {
    .twizted-category-cards.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .twizted-category-cards.columns-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .twizted-category-cards {
        gap: 20px;
        margin: 30px 0;
    }
    
    .twizted-category-cards.columns-2,
    .twizted-category-cards.columns-3,
    .twizted-category-cards.columns-4 {
        grid-template-columns: 1fr;
    }
    
    .category-card-content {
        padding: 20px;
    }
    
    .category-title {
        font-size: 20px;
    }
    
    .category-description {
        font-size: 14px;
        min-height: auto;
    }
    
    /* Make button always visible on mobile */
    .category-card-button {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .category-card-content {
        padding: 18px;
    }
    
    .category-title {
        font-size: 18px;
    }
    
    .product-count {
        font-size: 12px;
        padding: 5px 10px;
        top: 12px;
        right: 12px;
    }
    
    .shop-now-btn {
        padding: 12px 24px;
        font-size: 14px;
    }
}

/* Alternative: Full-width button style (uncomment if you prefer) */
/*
.category-card-button {
    margin-top: 20px;
}

.shop-now-btn {
    display: block;
    width: 100%;
    text-align: center;
}
*/
