/**
 * Product Categories Grid Widget Styles
 */

/* Container */
.pcg-container {
    width: 100%;
    box-sizing: border-box;
}

/* Title */
.pcg-title {
    margin: 0;
    padding: 0;
    line-height: 1.3;
}

/* Header */
.pcg-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

/* Footer */
.pcg-footer {
    margin-top: 20px;
    text-align: center;
}

/* View All Button */
.pcg-view-all-btn {
    display: inline-block;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.pcg-view-all-btn:hover {
    transform: translateY(-1px);
}

/* Content Wrapper */
.pcg-content-wrapper {
    display: flex;
    align-items: stretch;
    gap: 30px;
}

.pcg-image-left .pcg-content-wrapper {
    flex-direction: row;
}

.pcg-image-right .pcg-content-wrapper {
    flex-direction: row;
}

/* Categories Section */
.pcg-categories-section {
    flex: 1;
    min-width: 0;
}

/* Categories Grid */
.pcg-categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

/* Column Variants */
.pcg-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.pcg-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.pcg-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.pcg-cols-5 {
    grid-template-columns: repeat(5, 1fr);
}

/* Category Column */
.pcg-category-column {
    display: flex;
    flex-direction: column;
}

/* Category Link */
.pcg-category-link {
    display: block;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
    padding: 2px 0;
    line-height: 1.5;
}

.pcg-category-link:hover {
    text-decoration: underline;
}

/* Image Section */
.pcg-image-section {
    flex-shrink: 0;
    display: flex;
    align-items: stretch;
    justify-content: center;
}

.pcg-image-section img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* Image Positions */
.pcg-image-left .pcg-image-section {
    order: -1;
}

.pcg-image-right .pcg-image-section {
    order: 1;
}

/* Responsive: Tablet */
@media (max-width: 1024px) {
    .pcg-categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pcg-cols-5,
    .pcg-cols-4,
    .pcg-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive: Mobile */
@media (max-width: 767px) {
    .pcg-content-wrapper {
        flex-direction: column;
    }

    .pcg-categories-section {
        width: 100% !important;
    }

    .pcg-image-section {
        width: 100% !important;
        order: -1;
        margin-bottom: 20px;
    }

    .pcg-categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .pcg-cols-5,
    .pcg-cols-4,
    .pcg-cols-3,
    .pcg-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .pcg-categories-grid {
        grid-template-columns: 1fr;
    }

    .pcg-cols-5,
    .pcg-cols-4,
    .pcg-cols-3,
    .pcg-cols-2 {
        grid-template-columns: 1fr;
    }
}