/* ============================================================
   WooCommerce Category Grid – Front-end Styles
   ============================================================ */

/* ── Grid wrapper ── */
.wcg-wrapper {
    width: 100%;
    font-family: inherit;
}

.wcg-grid {
    display: grid;
    grid-template-columns: repeat(var(--wcg-columns, 6), 1fr);
    gap: 20px;
    width: 100%;
}

/* ── Card base ── */
.wcg-card {
    display: block;
    text-decoration: none;
    border: 2px solid var(--wcg-border-color, #e5e7eb);
    border-radius: 18px;
    background: #ffffff;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
                border-color 0.2s ease,
                box-shadow 0.25s ease;
    will-change: transform;
}

.wcg-card:hover {
    transform: scale(1.06);
    border-color: var(--wcg-border-hover, #0073aa);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.10);
    text-decoration: none;
}

/* ── Circle style ── */
.wcg-style-circle .wcg-card {
    border-radius: 50%;
    aspect-ratio: 1 / 1;
}

.wcg-style-circle .wcg-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

/* ── Card inner ── */
.wcg-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 20px;
    height: 100%;
    box-sizing: border-box;
}

/* ── Image wrap ── */
.wcg-image-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    overflow: hidden;
    margin-bottom: 14px;
}

.wcg-image-wrap img {
    max-width: 100%;
    max-height: 160px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
}

.wcg-card:hover .wcg-image-wrap img {
    transform: scale(1.04);
}

/* Circle image tweak */
.wcg-style-circle .wcg-image-wrap img {
    max-height: 100px;
}

/* ── Label ── */
.wcg-label {
    display: block;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.3;
    transition: color 0.2s ease;
    width: 100%;
}

/* ── Hidden cards ── */
.wcg-hidden {
    display: none !important;
}

/* ── Show All button wrap ── */
.wcg-show-all-wrap {
    display: flex;
    justify-content: center;
    margin-top: 32px;
}

/* ── Show All button ── */
.wcg-show-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 36px;
    border: none;
    border-radius: 50px;
    background-color: #0073aa;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 14px rgba(0, 115, 170, 0.30);
}

.wcg-show-all-btn:hover {
    background-color: #005177;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 115, 170, 0.40);
}

.wcg-show-all-btn:active {
    transform: translateY(0);
}

/* ── No categories message ── */
.wcg-no-categories {
    text-align: center;
    color: #888;
    padding: 40px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .wcg-grid {
        grid-template-columns: repeat(
            min(var(--wcg-columns, 6), 4),
            1fr
        );
    }
}

@media (max-width: 768px) {
    .wcg-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    .wcg-label {
        font-size: 12px;
    }
    .wcg-card-inner {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .wcg-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .wcg-image-wrap img {
        max-height: 90px;
    }
}
