/* CONTENEDOR GENERAL */
.cav-tv-wrapper {
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 10px 10px 30px;
    box-sizing: border-box;
    background: #ffffff;
}

/* CABECERA */
.cav-tv-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
}

.cav-tv-title {
    font-size: 22px;
    margin: 0 0 6px;
    font-weight: 700;
}

.cav-tv-subtitle {
    font-size: 18px;
    margin: 0 0 10px;
    color: #444;
}

.cav-tv-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cav-tv-link {
    display: inline-block;
    background: #2271b1;
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
}

.cav-tv-link:hover {
    background: #1a5a8a;
}

/* SECCIÓN */
.cav-tv-section-title {
    margin: 0 0 12px;
    font-size: 20px;
}

/* GRID DE ANUNCIOS */
.cav-tv-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

/* TARJETAS */
.cav-tv-card {
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    overflow: hidden;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cav-tv-card-image-link {
    display: block;
}

.cav-tv-card-image-box {
    width: 100%;
    padding-top: 75%; /* 4:3 aprox */
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
}

.cav-tv-card-image-box img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cav-tv-card-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #777;
}

/* CUERPO TARJETA */
.cav-tv-card-body {
    padding: 8px 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;

    /* ✅ IMPORTANTE: para empujar el botón abajo */
    flex: 1 1 auto;
}

.cav-tv-card-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
}

.cav-tv-card-title a {
    color: #222;
    text-decoration: none;
}

.cav-tv-card-title a:hover {
    text-decoration: underline;
}

.cav-tv-card-price {
    font-size: 14px;
    font-weight: 600;
}

.cav-tv-price-currency {
    margin-left: 4px;
    font-weight: 400;
}

.cav-tv-price-contact {
    font-size: 13px;
    color: #555;
}

/* ✅ BOTÓN "VER ANUNCIO" */
.cav-tv-card-actions{
    margin-top: auto;
    padding-top: 10px;
}

.cav-tv-card-btn{
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    box-sizing: border-box;
    background: #2271b1;
    color: #ffffff;
    border: none;
    cursor: pointer;
}

.cav-tv-card-btn:hover{
    background: #1a5a8a;
}

/* MENSAJES */
.cav-tv-msg {
    font-size: 14px;
    margin: 10px 0;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .cav-tv-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cav-tv-title {
        font-size: 20px;
    }

    .cav-tv-subtitle {
        font-size: 18px;
    }
}

@media (max-width: 520px) {
    .cav-tv-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .cav-tv-card-btn{
        padding: 11px 12px;
        font-size: 15px;
    }
}

/* EXTRA: si el tema mete imágenes o bloques con max-width, esto ayuda */
.cav-tv-wrapper img {
    max-width: 100%;
    height: auto;
}
