/* Category Showcase (common_category_showcase)
   One card per blog category: full-bleed image, navy scrim, name + count.
   Namespaced under .common-category-showcase — must not leak. */

.common-category-showcase {
    /* --ccs-accent y --ccs-cols llegan heredadas desde el wrapper (controles
       del widget); la indirección aporta el default de marca. */
    --_ccs-accent: var(--ccs-accent, oklch(58% 0.20 30));
    font-family: 'Inter', system-ui, sans-serif;
}

.ccs-header {
    margin-bottom: 24px;
}

.ccs-label {
    display: block;
    font: 600 12px/1 'JetBrains Mono', ui-monospace, monospace;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--_ccs-accent);
    margin-bottom: 10px;
}

.ccs-title {
    margin: 0;
    font-family: 'Playfair Display', serif;
    font-size: clamp(26px, 3.4vw, 40px);
    font-weight: 600;
    line-height: 1.15;
    color: oklch(18% 0.02 250);
}

.ccs-title em {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 500;
}

.ccs-title .accent-dot {
    color: var(--_ccs-accent);
}

.ccs-grid {
    display: grid;
    grid-template-columns: repeat(var(--ccs-cols, 4), 1fr);
    gap: 20px;
}

.ccs-card {
    position: relative;
    display: block;
    height: var(--ccs-height, 220px);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    background: oklch(25% 0.04 255);
    isolation: isolate;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ccs-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px oklch(20% 0.04 255 / 0.35);
}

.ccs-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.ccs-card:hover .ccs-card__img {
    transform: scale(1.05);
}

/* Fallback sin imagen: navy con glow del acento */
.ccs-card--no-image {
    background:
        radial-gradient(ellipse at 25% 0%, oklch(58% 0.20 30 / 0.35), transparent 55%),
        oklch(25% 0.04 255);
}

.ccs-card__scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        188deg,
        oklch(20% 0.04 255 / 0) 40%,
        oklch(58% 0.20 30 / 0.22) 62%,
        oklch(18% 0.045 255 / 0.94) 100%
    );
}

.ccs-card__body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 18px;
}

.ccs-card__name {
    font-family: 'Playfair Display', serif;
    font-size: 21px;
    font-weight: 600;
    line-height: 1.2;
    color: #fff;
}

.ccs-card__count {
    font: 500 12px/1.2 'JetBrains Mono', ui-monospace, monospace;
    letter-spacing: 0.04em;
    color: oklch(100% 0 0 / 0.72);
}

.ccs-card__arrow {
    position: absolute;
    right: 16px;
    bottom: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: oklch(100% 0 0 / 0.14);
    color: #fff;
    font-size: 15px;
    backdrop-filter: blur(4px);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.ccs-card:hover .ccs-card__arrow {
    background: var(--_ccs-accent);
    transform: translateX(3px);
}

@media (max-width: 1024px) {
    .ccs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .ccs-grid {
        grid-template-columns: 1fr;
    }

    .ccs-card {
        height: 180px;
    }
}
