/**
 * Tiger Category — Grid + Carousel (shared card styling).
 * Widget-scoped classes (tg-cat-*). Colors/typography are overridable via the
 * widget's Style controls; these are the tasteful defaults.
 */

.tg-cat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ---- Card ---- */
.tg-cat-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
    transition: transform .25s ease, box-shadow .25s ease;
    height: 100%;
}
.tg-cat-card:hover { transform: translateY(-6px); }

/* ---- Media ---- */
.tg-cat-media {
    position: relative;
    display: block;
    height: 180px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}
.tg-cat-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}
/* Overlay target for the Media ▸ Overlay controls (transparent until set). */
.tg-cat-media::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: transparent;
    transition: opacity .3s ease, background .3s ease;
}
.tg-cat-count--badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    background: #ec7002;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    padding: 6px 9px;
    border-radius: 999px;
}

/* ---- Body ---- */
.tg-cat-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
    flex: 1 1 auto;
}
.tg-cat-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: #0f172a;
}
.tg-cat-count--inline {
    font-size: .78em;
    font-weight: 600;
    opacity: .6;
}
.tg-cat-desc {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: #64748b;
}
.tg-cat-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #ec7002;
}
.tg-cat-more-arrow { transition: transform .2s ease; }
.tg-cat-card:hover .tg-cat-more-arrow { transform: translateX(4px); }

/* ---- Editor empty state ---- */
.tg-cat-empty {
    padding: 28px;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
}

/* ============================ CAROUSEL ============================ */
.tg-cat-wrap {
    position: relative;
    padding: 0 8px;
}
.tg-cat-cont { overflow: hidden; }
.tg-cat-slide { height: auto; display: flex; }
.tg-cat-slide > .tg-cat-card { width: 100%; }

.tg-cat-arrow {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    z-index: 5;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 1;
    color: #0f172a;
    background: #fff;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .14);
    transition: background .2s ease, color .2s ease, opacity .2s ease;
}
.tg-cat-arrow:hover { background: #ec7002; color: #fff; }
.tg-cat-arrow--prev { left: -6px; }
.tg-cat-arrow--next { right: -6px; }
.tg-cat-arrow.tiger-swiper-button-disabled { opacity: .4; cursor: default; }

.tg-cat-pag {
    position: static;
    margin-top: 18px;
    text-align: center;
}
.tg-cat-pag .tiger-swiper-pagination-bullet-active { background: #ec7002; }

/* ---- Responsive grid fallback ---- */
@media (max-width: 1024px) {
    .tg-cat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
    .tg-cat-grid { grid-template-columns: 1fr; }
}
